Substitute Jesus Navas scored a late goal to send Spain through to the European Championship quarter-finals as Group C winners last night – but only after a mighty scare against Slaven Bilic's unfortunate Croatia.
Mario Mandzukic and Ivan Rakitic both had earlier chances to break the deadlock and Croatia kept pushing deep into injury time as they sought the equaliser that could still have sent them through.
Croatia kept the Spaniards at bay for long periods, and Vicente Del Bosque's team will be extremely relieved to have come out on top of their group after their 1-0 win in Gdansk.
Fernando Torres came close to breaking the deadlock when he brought a good save out of Croatia goalkeeper Stipe Pletikosa in the 23rd minute. Although Spain dominated most of the early possession, chances were at a premium, with Jordi Alba blazing wide.
Torres skipped past Gordon Schildenfeld in the 23rd minute before firing straight at the goalkeeper from a tight angle. Croatia replied with some pressure of their own, Danijel Pranjic shooting low at Iker Casillas and Mandzukic blazing over the bar from just inside the box.
Croatia had a loud penalty appeal turned down in the 27th minute when Mandzukic's charge down the right flank was brought to an end by a crashing challenge from Sergio Ramos on the edge of the box, but referee Wolfgang Stark waved appeals away.
Croatia made a brighter start to the second half with a dangerous corner from Rakitic punched away by Casillas. They came agonisingly close to taking the lead in the 59th minute when Luka Modric beat Ramos on the right and crossed into the box, where Rakitic's low header was brilliantly saved at point-blank range by Casillas.
Del Bosque responded by replacing the ineffective Torres with winger Navas, as his side sought desperately to regain control of the game. But Croatia came close again in the 69th minute when two of their substitutes combined, Ivan Perisic finding space on the left to loft a cross which floated inches too high for Nikica Jelavic in front of goal.
Del Bosque introduced Cesc Fabregas who failed to get his shot off in a crowded box in the 78th minute, then Sergio Busquets missed a glorious chance with ten minutes to go when he hesitated in the box and was dispossessed by Croatia captain Darijo Srna.
Fabregas made the crucial move in the 87th minute when he lobbed Pletikosa to send Andres Iniesta clear, and he squared for substitute Navas to smash home the simplest of chances.
Antonio Cassano and Mario Balotelli fired Italy into the quarter-finals of Euro 2012 after a tense 2-0 victory over the Republic of Ireland in Poznan last night
The AC Milan striker headed home from Andrea Pirlo's 35th-minute corner before substitute Balotelli added a second at the death to finally finish off Ireland's brave resistance.
Spain's 1-0 win over Croatia in Gdansk meant the reigning champions topped Group C, but Italy went through in second place. On a night when only victory would do for Cesare Prandelli's men, they came up with the goods against an Irish side whose exit from the competition was confirmed last week.
While Italy dominated for long periods, they were unable to find a way past the green shirts for a second time to leave the Republic, led by winger Damien Duff on his 100th appearance for his country, in with a chance until Balotelli eventually calmed the Italians' nerves with a slick first-time finish.
Giovanni Trapattoni's side, who had midfielder Keith Andrews sent off late on, staged a late blitz on the Italian goal which came up only just short, and, although they restored some of their battered pride, they will return to Dublin today having failed to collect a single point.