A stoppage time penalty from Giorgos Samaras gave Greece a dramatic 2-1 victory over Ivory Coast in their final Group C match and took the Greeks through to the knock-out stages of the World Cup for the first time.
Samaras stroked home a controversial 93rd minute penalty after he was judged to have been tripped in the box by Giovanni Sio as the Greeks poured forward in search of a winner.
Their last-gasp victory left them second in the group on four points, one ahead of Ivory Coast and three clear of Japan. Colombia topped the group with a perfect nine points.
The Greeks, who had failed to get past the group stage at their two previous appearances at the World Cup, will face Costa Rica in Recife on Sunday in the last 16.
Greece needed to win to stand any chance of going through and took the lead just before halftime, Andreas Samaris pouncing on a mistake by Cheick Ismael Tiote and exchanging a quick one-two with Samaras before firing a low shot past Boubacar Barry.
But the Ivorians equalised on 74 minutes, substitute striker Wilfried Bony stroking home after being set up by Gervinho.
The Greeks went back on to the attack and won with virtually the last kick of the match to send Ivory Coast home at the group stage for the third consecutive World Cup.