FIFA World Cup: Italy 0 Costa Rica 1
Few would have given Jose Luis Pinto's side any hope of reaching the knockout stages prior to the start of the Brazil showpiece.
But, after stunning Uruguay 3-1 in their opening Group D encounter last Saturday, Costa Rica produced another fantastic performance to progress from the group phase of a World Cup for only the second time.
Friday's game was settled in the 44th minute as midfielder Bryan Ruiz's header ensured that England will be heading home early following a 2-1 loss to Uruguay on Thursday.
A below-par Italy now face the prospect of a mouth-watering showdown with Uruguay next Tuesday to determine who will be the other qualifier from Group D.
Costa Rica started brightly and came close after just six minutes when defender Celso Borges headed narrowly over the crossbar from a corner.
But, despite enjoying the better of the opening exchanges, Costa Rica were unable to really test Italy goalkeeper Gianluigi Buffon, who was restored to the starting XI after missing the 2-1 win over England due to an ankle injury.
Italy, perhaps hindered by the humidity at the Arena Pernambuco in Recife, struggled to create any opportunities of real note.
However, striker Mario Balotelli should have given Italy the lead on the half-hour mark when he latched on to a superb ball from Andrea Pirlo, only to lift an effort over Costa Rica goalkeeper Keylor Navas and wide of the goal.
Balotelli showed greater composure when handed another opportunity just two minutes later, but the Milan talisman's volley was kept out by a strong Navas save.
Costa Rica remained a threat, though, and forced Buffon into action for the first time as the Juventus shot-stopper prevented midfielder Christian Bolanos' curler from finding the bottom corner.
And Pinto's men were aggrieved not to have been awarded a penalty in the 43rd minute when Joel Campbell was barged over in the area by Giorgio Chiellini after the latter had given the ball away in midfield.
Yet Costa Rica will feel justice was served a minute later, Ruiz meeting Junior Diaz's magnificent left-wing cross with an excellent far-post header that cannoned off the underside of the bar and over the line.
Cesare Prandelli's response to falling behind was a positive one as he brought on striker Antonio Cassano for midfielder Thiago Motta after the interval.
Italy dictated play from the restart with Navas twice drawn into acrobatic stops, first to tip over a long-range effort from defender Matteo Darmian and then to keep out a Pirlo free-kick.
But the opportunities soon dried up for Italy as they laboured against a determined and well-organised Costa Rica defence.
And, despite the introductions of Lorenzo Insigne and Alessio Cerci, the four-time world champions could not find a way through, Costa Rica holding on for another famous result that ends England's slim hopes.