Match ends, Switzerland 1(4), Poland 1(5).
Poland will meet Portugal in the quarter-finals of Euro 2016 after beating Switzerland on penalties in the first knockout game of the tournament.
Arsenal newcomer Granit Xhaka was the only player to miss in the shootout, with Grzegorz Krychowiak scoring the winning spot-kick for the Poles.
Jakub Blaszczykowski had put Poland ahead six minutes before half-time.
Switzerland hit back through Xherdan Shaqiri's sublime finish, an overhead kick from 18 yards.
How the penalty shootout was won
Switzerland had never scored a penalty at a major tournament before, but they got off a flying start in the shootout as Stephan Lichtsteiner produced a composed finish down the middle.
After Robert Lewandowski levelled for Poland, Xhaka hit his penalty wildly wide to give the Poles the advantage.
Arkadiusz Milik, Kamil Glik and Jakub Blaszczykowski also scored for Poland while Shaqiri, Fabian Schar and Ricardo Rodriguez found the net for the Swiss to make it 4-4.
The winning kick by Krychowiak sparked scenes of jubilation among Poland's large travelling support in Saint-Etienne.
Can Poland go the distance?
Having reached the quarter-finals for the first time, Poland are just two wins from the final.
They dominated the first half without managing to kill off Switzerland and there remain doubts about their frontline.
Star striker Lewandowski is yet to find his best form in France, where the Poles have only scored three times in four games.
They should have been ahead after just 22 seconds here - Milik shooting wastefully over after Yann Sommer's throw out to Johan Djourou almost let in Lewandowski.
But they did go in front on 39 minutes, Blaszczykowski scoring his second goal in two games by firing home at the end of an excellent counter-attack.
Switzerland, lacklustre in the first half, were much improved after the break and Lukasz Fabianski had to pull off a world-class save to keep out Rodriguez's curling free-kick before Haris Seferovic struck the bar.
They deservedly equalised with a stunning 18-yard overhead finish from Shaqiri - the former Inter Milan and Bayern Munich man showing brilliant technique to score.
Switzerland fail to deliver
Shaqiri's equaliser will be talked about for years to come - a delicious finish that could win goal of the tournament.
Yet Switzerland's lacklustre start cost them as they allowed Poland to dominate midfield and take the lead.
Vladimir Petkovic's side exit the competition having reached the knockout stages for the first time.
But there might have been a different outcome had they shown more ambition in the first 45 minutes.
Man of the match - Xherdan Shaqiri
What they said
Poland manager Adam Nawałka: "The Swiss are world class in defence and attack. It's not surprising that when they were losing they chased the score. We had to drop deep to defend. That's why they created chances. But what's most important is that when they scored their goal, you could see the potential of my team. We were able to switch from defence to attack and we took back control of the game."
On goalless striker Lewandowski: "Robert is doing phenomenal work for this team. He's an incredibly important player for this side. He helps the team to be better, stronger. He's creating chances for other players and creating space for other players, taking players away from them. I'm confident the break will happen in the next match, and let our opponents be afraid from there."
Switzerland boss Vladimir Petkovic: "I'm very sad for Granit Xhaka, but it's not just about him. Switzerland lost and I'm sad about that. The players gave everything and showed what they can do on the pitch. But unfortunately we made mistakes and paid for that."
The stats you need to know
- Josef Hugi (six) is the only Switzerland player to have scored more goals at major international tournaments than Xherdan Shaqiri (four).
- Jakub Blaszczykowski has been directly involved in five of Poland's six goals in European Championship finals history (three goals, two assists).
- Poland's run of 370 minutes without conceding at Euro 2016 came to an end when Shaqiri scored.
- There were 39 shots in the first 90 minutes, more than at any other Euro 2016 game so far.
Poland will travel to Marseille, where they will play Portugal at the Stade Velodrome on Thursday at 20:00 BST. Switzerland's next competitive action comes when they begin their World Cup qualification campaign against Portugal in September.
- 22SchärBooked at 55mins
- 20DjourouBooked at 117mins
- 11BehramiSubstituted forFernandesat 77'minutes
- 15DzemailiSubstituted forEmboloat 58'minutes
- 18MehmediSubstituted forDerdiyokat 70'minutes
- 5Von Bergen
- 2PazdanBooked at 111mins
- 3JedrzejczykBooked at 58mins
- 5MaczynskiSubstituted forJodlowiecat 101'minutes
- 11GrosickiSubstituted forPeszkoat 104'minutes
- Mark Clattenburg
- Shots on Target
Penalty Shootout ends, Switzerland 1(4), Poland 1(5).
Goal! Switzerland 1(4), Poland 1(5). Grzegorz Krychowiak (Poland) converts the penalty with a right footed shot to the top left corner.
Goal! Switzerland 1(4), Poland 1(4). Ricardo Rodríguez (Switzerland) converts the penalty with a left footed shot to the bottom left corner.
Goal! Switzerland 1(3), Poland 1(4). Jakub Blaszczykowski (Poland) converts the penalty with a right footed shot to the bottom right corner.
Goal! Switzerland 1(3), Poland 1(3). Fabian Schär (Switzerland) converts the penalty with a right footed shot to the high centre of the goal.
Goal! Switzerland 1(2), Poland 1(3). Kamil Glik (Poland) converts the penalty with a right footed shot to the bottom left corner.
Goal! Switzerland 1(2), Poland 1(2). Xherdan Shaqiri (Switzerland) converts the penalty with a left footed shot to the bottom right corner.
Goal! Switzerland 1(1), Poland 1(2). Arkadiusz Milik (Poland) converts the penalty with a left footed shot to the top right corner.
Penalty missed! Bad penalty by Granit Xhaka (Switzerland) left footed shot is close, but misses to the left. Granit Xhaka should be disappointed.
Goal! Switzerland 1(1), Poland 1(1). Robert Lewandowski (Poland) converts the penalty with a right footed shot to the top right corner.
Goal! Switzerland 1(1), Poland 1. Stephan Lichtsteiner (Switzerland) converts the penalty with a right footed shot to the centre of the goal.
Penalty Shootout begins Switzerland 1, Poland 1.
Second Half Extra Time ends, Switzerland 1, Poland 1.
Johan Djourou (Switzerland) is shown the yellow card for a bad foul.
Foul by Johan Djourou (Switzerland).
Slawomir Peszko (Poland) wins a free kick in the defensive half.
Attempt blocked. Ricardo Rodríguez (Switzerland) left footed shot from the left side of the box is blocked. Assisted by Granit Xhaka.
Corner, Switzerland. Conceded by Slawomir Peszko.
Attempt missed. Eren Derdiyok (Switzerland) right footed shot from outside the box is too high from a direct free kick.