Recife (Brazil) (AFP) - Costa Rica goalkeeper Keylor Navas claimed man-of-the match honours as his side sank Greece in a penalty shootout to reach the World Cup quarter finals for the first time and a clash with the Netherlands.
Reduced to 10 men in the second half, Costa Rica still seemed to be on course for an upset victory until Sokratis Papastathopoulos made the score 1-1 in injury time to extend the battle.
Navas blocked a string of shots in the game and made a superb one-handed save of Fanis Gekas's penalty in the shootout to set up the 5-3 victory.
Captain Bryan Ruiz scored in the 52nd minute to give the central Americans a 1-0 lead at Arena Pernambuco.
But defender Oscar Duarte was ordered off for a second bookable offence shortly after and Greece poured forward looking for an equaliser.
They provided the late drama when Papastathopoulos pounced on the rebound from Gekas's strike in the first minute of added-on time to slam it past Navas.
But it was the only shot the Costa Rica goalkeeper missed all night and he was overwhelmingly voted man of the match.
Greece spurned several chances to win the game in extra time against the tiring Costa Ricans. Those misses proved costly for Fernando Santos's men in the penalty shoot-out.
With Costa Rica leading 4-3 after Joel Campbell rolled the ball past Orestis Karnezis, Gekas saw his chance to pull the Greeks level pushed away by Navas.
Costa Rica secured their first ever appearance in the last eight on what is only their fourth finals appearance when Michael Umana stepped up to beat Karnezis from the spot.
The Costa Ricans claimed another European scalp with the win, having beaten Italy 1-0 and drawn with England 0-0 in Group D.
Costa Rica started brightly, but early offerings by Christian Bolanos and Ruiz, set up by Campbell after he had dispossessed a Greek defender, came to nothing.
The Central Americans came close just before the quarter-hour when Ruiz set up Bolanos to the left of goal but his drive rose above the hands of Karnezis.
Greece, appearing in the last 16 for the first time, spurned their best chance of the half on 37 minutes.
Dimitrios Salpingidis had ghosted in at the back post to connect with a cross that had been whipped in from the left, but his first-timer saw a flailing Navas to turn the ball to safety for a corner.
Greece's positive end to the half was in stark contrast to a terrible start to the second.
An innocuous-looking attack launched by Campbell on the left saw Bolanos set up Ruiz to sidefoot a low shot past the static Karnezis, whose view appeared blocked by Papastathopoulos.
Urgency was injected into the pace of the game immediately, but after Kostas Mitroglou replaced fellow striker Andreas Samaris, the Greeks were given a boost when Duarte was given a second yellow card for a wild lunge on Jose Cholevas.
Santos made a series of changes late in the game and the arrival of Gekas for Salpingidis would prove crucial.
In the first minute of injury time Gekas pounced on a loose ball in the area and when Navas blocked his shot on the turn Papastathopoulos slammed home the rebound home to send the Greeks wild.
Navas had to look smart two minutes later when Mitroglou's glancing header forced him into a spectacular one-handed save before the whistle blew to signal extra-time.
The leveller stunned an already tiring Costa Rica, who did well to survive a Greek onslaught in extra time.
Only the foot of Giancarlo Gonzalez denied Kostas Katsouranis to the left of goal, and then Navas was forced out to dive low and collect as Gekas ran on to a dangerous through bal