Czech Republic 1-0 Poland
Petr Jiracek scored the only goal of a scrappy game in Wroclaw to break Polish hearts and send Czech Republic into the quarter-finals as winners of Group A.
The Wolfsburg midfielder poked the ball beyond Poland goalkeeper Przemyslaw Tyton 18 minutes from time to dump the co-hosts out of Euro 2012.
Poland came into the game knowing that a win would have taken them into the last eight for the first time.
Captain Jakub Blaszczykowski had a last-gasp effort cleared off the line.
But Poland were left to rue enough missed chances to have rescued matters long before then.
The co-hosts had dominated the first half, creating and then spurning a series of opportunities that would ultimately cost them dear.
As the game wore on, Michal Bilek's Czech side turned the momentum their way to leave their opponents and a nation inconsolable at the final whistle.
The Czechs will now play the runners-up from Group B, likely to be either Portugal or Denmark, although the Netherlands also have a chance.
For Poland, the result was all the more painful with this billed a historic night, a night when a nation came together in an effort to write their own feel-good story.
Before kick-off a vast red-and-white flag was unfurled in the stands. It had taken 30 seamstresses three days to produce at the cost of £15,000 and though it carried no slogan, the message was clear. A nation expected.
Poland coach Franciszek Smuda had spoken of a fear that his side might be "paralysed by pressure". His words were ultimately to prove prophetic, yet in the early stages Poland were tremendous.
Sharper to the ball and swifter to use it, the co-hosts immediately found their fluency. Their attacking play was rapier sharp, their movement inventive.
But while Poland's attacking quartet created a succession of clear-cut chances in an opening half-hour they dictated, all of them were, crucially, spurned.
Striker Robert Lewandowski had the best of them, linking up delightfully with Blaszczykowski only to slice a left-footed shot wide of the upright under pressure from Theodor Gebre Selassie.
Ludovic Obraniak's left-footed free-kicks were also a constant threat for Poland and twice almost brought goals.
The first curled narrowly wide of Cech's post, the second was blocked on its path to goal, before Sebastian Boenisch fired the rebound narrowly wide.
But just as the thunder and lightning started to rumble in the skies over Wroclaw, the momentum began to swing.
Poland crumbled as Czech Republic turned the tide in a way that defied logic.
The force, long absent, was with them now with the impish figure of Vaclav Pilar pulling the strings as the red shirts poured forward time and again, scattering white shirts like laundry torn from a washing line.
But while the Czechs were a constant danger now, it was news of a Greek goal in Warsaw that really changed the landscape of Group A at half-time, with both sides left knowing only a win would be enough.
If the opening exchanges had been accompanied by the overwhelming passion of the home support, the second half was played to a soundtrack of hushed tension.
David Limbersky's surging runs tore the Poland defence apart time and again, while the tireless Pilar probed and prodded in midfield.
For long periods, Poland were pinned deep in their own half.
First Pilar's scrambled shot was cleared, before Gebre Selassie rose to head narrowly over.
Poland goalkeeper Przemyslaw Tyton was forced into a point-blank save when Tomas Sivok headed goalwards moments later but hope was visibly draining from the Polish players.
On the rare occasions they did break forward passes were misplaced, mistakes crept in.
It was from one such rare attack that the Czech Republic struck the blow that would decide the game. On this occasion it was Rafal Murawski who lost the ball - and the Czechs broke with devastating speed.
Milan Baros, for so long a bystander, beat his man and found Jiracek who broke into the penalty area, cut cleverly away from Boenisch's despairing tackle and rolled the ball into the net.
Tempers flared and frustrations boiled over as Poland began to recognise their fate.
But they battled on in the knowledge one goal could still deny the Czechs their place in the last eight. In the final minute Blaszczykowski found space in the area and managed to dink the ball over Cech.
The ball appeared goalbound but Michal Kadlec appeared from nowhere to divert the ball to safety and secure the Czechs safe passage on a night of high drama.