Last updated on .From the section 2014 Fifa World Cup

World Cup 2014: Greece 2-1 Ivory Coast highlights

Greece qualified for the last 16 of a World Cup for the first time with a dramatic victory against Ivory Coast.

Georgios Samaras converted a controversial injury-time penalty to seal the win after he was adjudged to have been fouled by Giovanni Sio.

Greece had taken a first-half lead when substitute Andreas Samaris scored after Cheick Tiote's defensive mistake.

Ivory Coast had looked like advancing as Wilfried Bony equalised from Gervinho's pass, before the late twist.

Analysis Brad Friedel Tottenham and former USA goalkeeper "There was some contact but it looks like Samaras has gone to strike the ball and has kicked Sio and fallen over. For me that is not a penalty. "Samaras has not scored for two years but looked as cool and calm as possible. The Greek players went crazy."

Soon after their elimination from the tournament was confirmed, Ivory Coast coach Sabri Lamouchi resigned.

Greece will face Costa Rica in the second round in Recife on Sunday, while the Ivorians have now gone out in the group phase in each of the last three World Cups.

They began the day second in the table and, with Colombia beating Japan 4-1 in the other Group C match, needed only a point to become the first African side to qualify for the second phase in this year's competition.

However, Greece, who offered little as an attacking threat in the second half, were given an opportunity to grab the winner when referee Christian Lescano pointed to the spot, despite Ivorian protests.

They were unhappy that Samaras, who kicked the turf, had fallen to the ground, but the official gave the decision and Samaras kept his composure to shoot past Ivory Coast goalkeeper Boubacar Barry for his first international goal since Euro 2012.

Greece started the day bottom of their group, and their hopes of qualifying suffered a further setback when they had to make two substitutions inside the first 24 minutes, including goalkeeper Orestis Karnezis with a back injury.

Greece's Georgios Samaras converts a dramatic injury-time penalty to take his side into the last 16

However, they created the best first-half opportunities with Samaras leading a quick attack and releasing Jose Holebas, whose shot from the edge of the penalty area rebounded off the crossbar.

Fernando Santos's Greece team went ahead with their first goal of the tournament and only their third in three World Cups.

Newcastle midfielder Tiote carelessly lost the ball to Samaris, who played a one-two with Samaras before lifting the ball over Ivory Coast goalkeeper Barry.

Teams through and eliminated Teams through so far: Brazil, Mexico, Netherlands, Chile, Colombia, Greece, Costa Rica, Uruguay, France, Argentina, Belgium Teams eliminated so far: Croatia, Cameroon, Spain, Australia, Ivory Coast, Japan, Italy, England, Bosnia-Hercegovina

Despite the African side seeing more of the possession after the break, Karagounis almost made it 2-0 with a long-range effort that hit the crossbar.

But Ivory Coast, who had seen Salomon Kalou and Wilfried Bony shoot wastefully wide earlier in the second half, deservedly equalised with a quick counter-attack as ex-Arsenal forward Gervinho set up Bony.

The Swansea striker, who scored in their 2-1 win against Japan on Sunday, calmly finished past substitute goalkeeper Panagiotis Glykos.

That goal sparked wild Ivory Coast celebrations, but their joy turned to despair with Samaras's 93rd-minute penalty.

Ivory Coast coach Sabri Lamouchi: "My contract comes to an end at this World Cup and there will be no epilogue. It is logical as we did not do well at last year's Africa Cup of Nations or at the World Cup finals.

"The Ivory Coast is a great football nation. And this was a cruel game. After so much hard work and so much sacrifice, all of us and everyone in the Ivory Coast is very sad."

Greece coach Fernando Santos: "We found balance tonight. We are not the worst team when we lose or the best when we win.

"To everyone in Greece I say, 'Go out into the street and celebrate.'"

Greece captain Giorgos Karagounis: "We came here to advance from the group stage. We've never done it before, and we did in a great way.

"The goal should have come earlier. So God helped us in the end and we all thank him. We prevailed against the odds. We had passion and we had fight."

Andreas Samaris put Greece ahead with their first goal of the tournament just before half-time

Greece had gone out in the group phase of both the 1994 and 2010 World Cup tournaments

Wilfried Bony and Gervinho celebrate Ivory Coast's equaliser, but Greece scored a controversial winner

Ivory Coast had begun the day in the second qualifying position in Group C

Greece celebrate their victory, while Ivory Coast defender Kolo Toure watches on