Giorgos Karagounis reacts
Czech Republic beat Poland 1-0 thanks to Petr Jiracek's second-half strike, while Greece upset the odds by beating Russia 1-0, veteran captain Giorgos Karagounis firing Greece's winner, to claim the second qualifying spot via the head-to-head rule.
Having started the day bottom of Group A, Greece produced a remarkable result against the Russians with Karagounis marking his 120th international cap with arguably his most important goal in the colours of his country.
A forgettable first half was drawing to a close when the 35-year-old midfielder suddenly burst into life.
Sergei Ignashevich failed to deal with a routine throw down the line, allowing Karagounis to spring clear and drill low under Vyacheslav Malafeev.
A narrow win, coupled with a 1-0 victory for the Czech Republic over co-hosts Poland, proved to be enough to see 2004 champions Greece into the last eight at Russia's expense.
Co-hosts Poland crashed out of Euro 2012 after a night of treacherous rain at the Municipal Stadium.
Czech Republic's goal came when Poland lost possession in the middle of their opponents half and after a swift break Milan Baros slipped a pass in front of Jiracek and he stepped inside Marcin Wasilewski to slot the ball into the far corner.
After the break the Czechs took a firm grip of proceedings and Tomas Sivok sent his point-blank header against keeper Przemyslaw Tyton from Jaroslav Plasil's swirling free-kick.
Tyton then got down and held a low Milan Baros drive, but the deadlock was finally broken by Jiracek with 18 minutes remaining.
Poland almost knocked Czech Republic out as well with just seconds remaining as Jakub Blaszczykowski's shot on the turn beat Cech but Michal Kadlec dived back to head off the line.