Spain have managed to produce a late winner to beat Croatia 1-0 allowing them to finish on top of Group C at Euro2012.
Substitute Jesus Navas eased the nerves of the Spanish fans with an 88th minute goal from close range to put his side through to the quarter-finals where they will face the runners-up of Group D who at this stage is England.
An organised Croatian outfit, under the guidance of Slaven Bilic for perhaps the final time, where dour in defence but also had some great chances which could have eliminated reigning champions Spain who were not at their best throughout the 90 minutes.
With less than three minutes from time, Spain eventually broke the deadlock when Cesc Fabregas picked the lock with a lovely lofted pass to Andres Iniesta who controlled with his chest before squaring it to an unmarked Jesus Navas who took one touch before slamming it into the back of the net.
It was more a sense of relief for the Spaniards who assured their path through to the next phase whilst topping the group after Italy had held top billing for much of the night with their eventual 2-0 win over Republic of Ireland.
In the 23rd minute, Fernando Torres was close to squeezing in a well-struck shot from a very tight angle but Croatian keeper Stipe Pletikosa was well-placed before Sergio Ramos tested him with a curling effort from range.
The 27th minute saw Croatia have a big shout for a penalty when Ramos went in very hard on Mario Mandzukic and appeared to take all man with his tackle but referee Wolfgang Stark waved away the protests, perhaps because the challenge was right on the edge of the box, but a free-kick was not even paid.
Apart from the goal, the best chance of the match came when Croatia caught Spain on the break with Luka Modric advancing down the right before picking out Ivan Rakitic whose unmarked header was hit straight at Iker Casillas.
In the 79th minute, Ivan Perisic controlled with his chest on the right side of the area but his volley was struck at Casillas on the bounce with the Spanish keeper able to knock it to safety and then it was Pletikosa's turn to save his side when he made almost mirrored blocks on Iniesta on the left and Jesus Navas on the right.
Croatia also had calls for another penalty just moments before the goal when Vedran Corluka was manhandled by Sergio Busquets when attempting to get his head on a corner but again Stark waved away any shouts.
In the end though, Vicente del Bosque's world champions continued on their merry way with a second victory of the tournament to move through to the final eight although they will want to improve sharply no matter who they face in Donetsk on Saturday.
Euro2012 - Group C
Croatia: 0 Spain: 1 (Jesus Navas 88')
PGE Arena, Gdansk