Poland beat Switzerland 5-4 on penalties to become the first side to book their place in the quarter-finals of Euro 2016.
The two sides could not be split inside 120 minutes, after Xherdan Shaqiri cancelled out Jakub Blaszczykowski with a late wonder strike, and it was left for Grzegorz Krychowiak to net the winning penalty in Saint-Etienne after Arsenal new boy Granit Xhaka blasted wide.
Poland - who reach the last eight of a major tournament for the first time since the 1982 World Cup - led for much of the second half after netting just before the break, but Switzerland levelled things up in the 82nd minute when Stoke star Shaqiri produced a real contender for goal of the tournament.
The eventual winners should have been ahead inside 30 seconds after a terrible mix-up in the Switzerland back-line. Yann Sommer opted to throw the ball short to Johan Djourou, but the former Arsenal defender's attempted back-pass was lacklustre.
Lurking was Robert Lewandowski to nip in, but Sommer reacted quick enough to block the initial effort. The ball squirmed across to Arkadiusz Milik, who could only lash his shot over the bar with the whole goal to aim at.
It was all Poland in the opening 20 minutes as Switzerland struggled to get out of their own half. Milik had the first on-target shot of the tie when he aimed a free header straight at Sommer from the back post, and Lewandowski could have scored when he lashed over on 19 minutes.
Switzerland grew into the game and should have had a goal themselves when centre-back Fabian Schar found himself free at a corner. The ball was whipped in towards the back post, but the Hoffenheim man could only direct his effort into the ground and Lukasz Fabianski gratefully claimed it.
Against the run of play, but probably deserved on the overall balance of the first half, Poland took the lead six minutes before the break.
Fabianski set Kamil Grosicki - only playing due to the suspension of Bartosz Kapustka - off down down the left flank and the Rennes forward bundled his way through the defence, watching the ball clatter off a defender only to fall straight back to his feet.
Blaszczykowski, who had engineered some space at the back post, was screaming for the ball and Grosicki found him, via a dummy from Milik in the centre. One touch got the ball under control, before Blaszczykowski slotted underneath Sommer to send the Poland fans into raptures.
In the second half, Switzerland were a different side, working hard to engineer a number of chances to level things up. Shaqiri had the first, his powerful effort beaten away by Fabianski in the Poland goal.
Switzerland were then lucky to keep 11 men on the field when Fabian Schar was booked for a foul on Robert Lewandowski. The tackle was late, two-footed and reckless, but referee Mark Clattenburg only brandished a yellow card.
Breel Embolo came on for the Swiss in the second half, and he was central to many of their attacking moves in the latter stages.
They were almost level on 79, when the out-of-sorts Haris Seferovic cannoned an effort off the bar. Embolo had the initial shot blocked away, before the ball dropped to their main striker, but he couldn't quite keep it on target.
In the end it didn't matter, as the goal they were looking for came just three minutes later - and in some style.
Captain Stephan Lichtsteiner's cross from the left was half-cleared by Pazdan, but it sat up perfectly for Shaqiri to strike. With the ball dropping over his shoulder he jumped and twisted in the air to produce an incredible scissor-kick that went in off the post as Fabianski dived desperately.
The 30 minutes of extra time were patient and, at times, lacklustre, both sides opting to keep it tight in defence.
Switzerland came closest right at the death through substitute Eren Deriyok, but eventually the tie went to penalties.
Lichtsteiner and Lewandowski powered their spot-kicks home, before new Arsenal signing Xhaka was the first to flinch, firing well wide.
Everyone else netted theirs, meaning it came down to Krychowiak to win it for Poland with the fifth spot-kick. A leader on the pitch for the entire game, the Polish No 10 stepped up and made no mistake, finding the top corner with ease.
Poland are the first side to reach the quarter-finals - the first time they've ever reached this stage of a European Championship - and will face Portugal in Marseille on Thursday.