FORTALEZA, Brazil (AP) Talk about close.
Greece is through to the last 16 at the World Cup by the slimmest of imaginable margins: Thrashed by Colombia 3-0 in the opener, holding Japan 0-0 with 10 men, and only scoring in its final game.
Georgios Samaras' injury time penalty on Tuesday provided the 2-1 win needed to eliminate Ivory Coast in Group C.
After disappointing in their first two matches, the Greeks came alive against Didier Drogba's favored Africans. Their reshuffled lineup produced a string of scoring chances - hitting the woodwork three times and narrowly missing twice with striker Dimitris Salpingidis.
The secret to Greece's success, Samaras said, was that team members played unselfishly.
''There are no leaders, no heroes, or anything like that. There's a group of players, who help each other and cover for their teammates' mistakes. We share our joy together,'' said the striker, who left Celtic at the end of last season.
''It's being a team. That's what gave us the (European) championship in 2004, and that is what's keeping us going now.''
Greece's ability to pull off surprises, like its stunning success a decade ago, has always been executed with one football boot in the exit door.
Before winning the European title, Greece advanced from its group by a particularly narrow margin. Level on points and goal difference with Spain, it advanced thanks to a higher goal tally.
Greece has since played at four other major tournaments, again making the quarterfinals on four points at Euro 2012, with a last-game upset against Russia, following a draw and a loss.
''You always need luck on your side. But I do believe that in life, if you deserve something, in the end God gives it to you,'' defender Sokratis Papastathopoulos said before the team left Fortaleza.
The drama that comes with Greek qualification - the squad lost a standout player and its goalkeeper through injury early in Tuesday's game - made the post-match partying all the wilder.
Players celebrated on the team bus singing ''I came to Brazil/Land of Pele/And everything looks blue.''
In Athens, Thessaloniki and other Greek cities, fans with blue-and-white Greek flags poured into the streets for post-midnight celebrations, after nearly three-quarters of the country's TV viewers had watched the game.
For Giorgos Karagounis, Greece's 37-year-old captain and veteran of the 2004 campaign, staying in Brazil means he can extend his record-breaking run of international appearances, currently at 138, before his expected international retirement at the end of the tournament.
''Everybody is just very happy ... The winning goal only came after 90 minutes. But that made the victory even sweeter,'' he said.
''I hope we get to stay in Brazil as long as possible. It's been an amazing World Cup - an amazing tournament with Greece as a part of it.''
Follow Gatopoulos at http://www.twitter.com/dgatopoulos