Jesus Navas scored a dramatic late winner as Spain produced a nervy and unconvincing performance to qualify for the quarter-finals of Euro 2012.
The Seville winger walked in Andres Iniesta's clever pass two minutes from time to break Croatia hearts and ensure the champions top Group C.
Alan PardewNewcastle United manager
"Spain taking Fernando Torres off with half an hour left was a bit of a risk for the manager but it paid off because the substitute Jesus Navas scored the goal. There was a gap in the Croatian defence for the first time and I think Iniesta and Navas were both onside. But Spain weren't brilliant, and if I was in the England squad, I wouldn't be worried watching that."
Spain had come within a single goal of leaving the tournament but ultimately it was Croatia who missed out.
The world champions could face England, France or Ukraine in the last eight.
The landscape of the group might have been so different had Croatia scored the goal they had threatened to for long periods of the second half, however.
On a night of tension and frustration in Gdansk, Slaven Bilic's men stretched their more celebrated opponents time and again with Luka Modric tormenting the Spanish midfield with a vibrant, menacing performance.
The Tottenham Hotspur midfielder created the best chance of the match for Croatia on the hour mark, finding Ivan Rakitic from a scintillating cross delivered with the outside of his right boot which the Seville midfielder could only head directly at Spain goalkeeper Ilker Casillas.
Spain march on, however, now unbeaten in 17 competitive matches. But this was a performance that epitomised their faltering progress here: style but no substance, beauty but no brawn, panache but no penetration.
Much of the talk before the game had centred on Italy's fear that Spain and Croatia would contrive a 2-2 draw - a result that would have ensured both teams qualified for the quarter-finals at the Azzurri's expense. But at no stage did either side look capable of mustering two goals.
Bilic, in his last match as Croatia coach, had sent his side out intent on showing discipline and total determination to resist the mesmerising quality of Spain's football.
And for much of the opening 45 minutes, Croatia were outpassed, if not outclassed. But they stood firm, with the twin towers of Vedran Corluka and Gordon Schildenfeld at the heart of the defence epitomising Croatia's spirit and refusal to yield.
They could not, though, prevent Xavi from gradually getting Spain moving. Fernando Torres saw a fierce low shot turned away by Stipe Pletikosa after 22 minutes before David Silva and Iniesta twice almost linked up to devastating effect.
But for all their possession, Bilic's plan to stifle Spain was working and as the half wore on mistakes began to creep into the defending champions' normally flawless passing game.
Croatia were quick to pounce on the scraps, testing Casillas from Daniel Pranjic's low shot. There were vehement protests when the tireless Mario Mandzukic burst clear of Ramos and Pique, only for the Real Madrid defender to clatter into the Croatia striker on the right of the penalty area.
The referee waved away Croatia's penalty claims with Corluka booked for his protests.
News of an Italian goal shortly before half-time in Posnan changed things. Not only did Croatia now know they could no longer settle for a draw but now Spain's hopes of defending their trophy would, unthinkably, end if they conceded without reply.
Croatia were noticeably more progressive, competing for the ball in midfield and committing men forward in greater numbers. Modric skipped away from Spain's midfield trio from one such attack on the hour mark, to spark a move more fluid and threatening than anything they had produced until then.
The Tottenham playmaker evaded the attention of Jordi Alba and then Ramos, before picking out the unmarked Rakitic with a delightfully weighted cross that the Sevilla midfielder headed straight at Casillas from six yards. If Spanish hearts were in mouths then, the drama was to continue.
Navas scores Spain winner
Bilic introduced Everton striker Nikica Jelavic and Borussia Dortmund's Ivan Perisic as Croatia pushed again and the pair linked up immediately only for the final pass to run astray. Spain were on the back foot now, prompting head coach Vincente Del Bosque to introduce Jesus Navas and former Arsenal midfielder Cesc Fabregas.
It was a decision that would alter the course of the game. Fabregas might have had his third goal of the tournament shortly after coming on and although substitute Ivan Perisic thumped a fierce low volley that Casillas turned away, Spain were looking increasingly dangerous as the game became stretched.
Sergio Busquets should have put Spain after a fluid counter-attack, while Fabregas freed Iniesta down the left of the penalty area only for Pletikosa to turn the ball away.
The Barcelona midfielders were at the heart of everything now as Croatia finally began to tire.
With three minutes remaining Spain finally found space. Again Fabregas was at the heart of things, scooping a delightful through-ball to Iniesta who brought the ball down on his chest, beat the off-side trap and squared to Navas who walked the ball towards goal, thumping it into the net from a yard out with a shot that spoke of Spain's frustration.
Croatia's players collapsed on the turf. For Spain the emotion was relief.
Full Time The referee signals the end of the game.
Nikica Jelavic concedes a free kick for a foul on Garcia Sergio Ramos. Iker Casillas restarts play with the free kick.
Sergio Busquets concedes a free kick for a foul on Darijo Srna. Gordon Schildenfeld restarts play with the free kick.
90:00 +3:18 Booking
Booking Ivan Rakitic is given a yellow card.
The official flags Alvaro Negredo offside. Stipe Pletikosa takes the direct free kick.
Direct free kick taken by Gerard Pique.
90:00 +0:14 Booking
Booking The referee books Nikica Jelavic for unsporting behaviour.
Nikica Jelavic is penalised for handball and concedes a free kick.
Iker Casillas takes the free kick.
Booking Mario Mandzukic booked.
Free kick awarded for an unfair challenge on Alvaro Arbeloa by Mario Mandzukic.
Substitution Alvaro Negredo is brought on as a substitute for Hernandez Xavi.
Assist on the goal came from Andres Iniesta.
87:05 Goal scored
Goal! - Gonzalez Jesus Navas - Croatia 0 - 1 Spain Goal scored by Gonzalez Jesus Navas from close range high into the middle of the goal. Croatia 0-1 Spain.
Corner taken right-footed by Ivan Rakitic, Vedran Corluka produces a header from deep inside the six-yard box that clears the crossbar.
A cross is delivered by Ivan Strinic, Alvaro Arbeloa gets a block in.
Gonzalez Jesus Navas takes a shot. Save by Stipe Pletikosa.
Inswinging corner taken from the left by-line by Hernandez Xavi, Da Silva Eduardo makes a clearance.
Andres Iniesta takes a shot. Save by Stipe Pletikosa.
Substitution Da Silva Eduardo joins the action as a substitute, replacing Ognjen Vukojevic.
Inswinging corner taken from the left by-line by Ivan Rakitic, Iker Casillas makes a save.
Darijo Srna sends in a cross, Alvaro Arbeloa makes a clearance.
Ivan Perisic has a volleyed shot. Save by Iker Casillas.
Corner taken right-footed by Hernandez Xavi from the left by-line, Ivan Strinic makes a clearance.
Francesc Fabregas takes a shot. Blocked by Darijo Srna.
Foul by Hernandez Xavi on Luka Modric, free kick awarded. Luka Modric takes the direct free kick.
Hernandez Xavi decides to take the corner short.
Substitution David Silva goes off and Francesc Fabregas comes on.
Corner taken right-footed by Hernandez Xavi from the right by-line, clearance by Mario Mandzukic.
The ball is delivered by Gonzalez Jesus Navas, Ivan Strinic gets a block in.
Close range effort by Ivan Perisic goes wide of the left-hand post.
Ivan Perisic crosses the ball, clearance made by Ramos Jordi Alba.
Xabi Alonso sends in a cross, David Silva concedes a free kick for a foul on Vedran Corluka. Direct free kick taken by Stipe Pletikosa.
Corner taken short by Hernandez Xavi.
Sergio Busquets crosses the ball, Gordon Schildenfeld manages to make a clearance.
Outswinging corner taken by Hernandez Xavi from the right by-line.
Gonzalez Jesus Navas produces a cross, Gordon Schildenfeld manages to make a clearance.
Outswinging corner taken right-footed by Hernandez Xavi from the right by-line, Headed effort from deep inside the penalty area by Garcia Sergio Ramos goes harmlessly over the crossbar.
Substitution Nikica Jelavic joins the action as a substitute, replacing Domagoj Vida.
Substitution Ivan Perisic joins the action as a substitute, replacing Danijel Pranjic.
Andres Iniesta gives away a free kick for an unfair challenge on Domagoj Vida. Domagoj Vida takes the free kick.
Foul by Ivan Rakitic on Andres Iniesta, free kick awarded. Ramos Jordi Alba restarts play with the free kick.
Vedran Corluka takes the direct free kick.
Substitution Gonzalez Jesus Navas joins the action as a substitute, replacing Fernando Torres.
Free kick awarded for an unfair challenge on Gordon Schildenfeld by Fernando Torres.
Fernando Torres takes a shot. Blocked by Domagoj Vida.
Outswinging corner taken by Hernandez Xavi, clearance made by Vedran Corluka.
David Silva takes a shot. Gordon Schildenfeld gets a block in.
The ball is swung over by Luka Modric, Ivan Rakitic takes a shot. Iker Casillas makes a save.
Alvaro Arbeloa gives away a free kick for an unfair challenge on Mario Mandzukic. The free kick is delivered right-footed by Ivan Rakitic from left wing, Xabi Alonso makes a clearance.
Handball by Darijo Srna. Iker Casillas restarts play with the free kick.
Booking Ivan Strinic goes into the book for unsporting behaviour.
Gordon Schildenfeld fouled by David Silva, the ref awards a free kick. Stipe Pletikosa takes the direct free kick.
Foul by Ramos Jordi Alba on Darijo Srna, free kick awarded. Stipe Pletikosa takes the free kick.
Inswinging corner taken by Ivan Rakitic from the left by-line, Vedran Corluka gives away a free kick for an unfair challenge on Gerard Pique. Free kick taken by Iker Casillas.
The ball is delivered by Ivan Strinic, blocked by David Silva.
Alvaro Arbeloa challenges Ivan Strinic unfairly and gives away a free kick. Stipe Pletikosa takes the free kick.
Foul by Danijel Pranjic on Alvaro Arbeloa, free kick awarded. Xabi Alonso restarts play with the free kick.
Foul by Ivan Strinic on David Silva, free kick awarded. Direct free kick taken by Xabi Alonso.
The second half begins.
45:00 +2:06 Half time
Half Time The referee calls an end to the first half.
Outswinging corner taken right-footed by Hernandez Xavi, clearance by Mario Mandzukic.
David Silva sends in a cross, Gordon Schildenfeld gets a block in.
Garcia Sergio Ramos takes the direct free kick.
Booking Darijo Srna receives a caution for unsporting behaviour.
Sergio Busquets fouled by Darijo Srna, the ref awards a free kick.
Corner taken right-footed by Hernandez Xavi, Vedran Corluka fouled by Garcia Sergio Ramos, the ref awards a free kick. Direct free kick taken by Stipe Pletikosa.
Darijo Srna challenges Sergio Busquets unfairly and gives away a free kick. Garcia Sergio Ramos restarts play with the free kick.
A cross is delivered by Mario Mandzukic.
Danijel Pranjic is adjudged to have handled the ball. Alvaro Arbeloa restarts play with the free kick.
Andres Iniesta takes a shot. Domagoj Vida gets a block in.
Foul by Danijel Pranjic on Sergio Busquets, free kick awarded. Xabi Alonso restarts play with the free kick.
David Silva takes a shot. Save made by Stipe Pletikosa.
David Silva takes a shot. Save by Stipe Pletikosa.
David Silva produces a volleyed left-footed shot from 12 yards. Save by Stipe Pletikosa.
Darijo Srna takes a outswinging corner.
Booking Caution for Vedran Corluka.
Shot on goal by Mario Mandzukic from just inside the area clears the crossbar.
Danijel Pranjic takes a shot. Save made by Iker Casillas.
Gerard Pique takes a shot from a long way out clearing the bar.
Garcia Sergio Ramos takes a shot. Stipe Pletikosa makes a save.
Fernando Torres takes a shot. Stipe Pletikosa makes a save.
Unfair challenge on Darijo Srna by Garcia Sergio Ramos results in a free kick. Ivan Rakitic crosses the ball from the free kick right-footed from right wing, clearance by Gerard Pique.
Free kick awarded for an unfair challenge on David Silva by Ognjen Vukojevic. Free kick crossed by Hernandez Xavi, Vedran Corluka fouled by Fernando Torres, the ref awards a free kick. Stipe Pletikosa takes the direct free kick.
Free kick awarded for an unfair challenge on Alvaro Arbeloa by Danijel Pranjic. Free kick taken by Xabi Alonso.
Unfair challenge on Ramos Jordi Alba by Darijo Srna results in a free kick. Ramos Jordi Alba takes the direct free kick.
Foul by Ivan Rakitic on Ramos Jordi Alba, free kick awarded. Andres Iniesta takes the free kick.
Andres Iniesta challenges Darijo Srna unfairly and gives away a free kick. Ivan Rakitic takes the free kick.
Andres Iniesta takes a shot. Save made by Stipe Pletikosa.
Free kick awarded for an unfair challenge on Alvaro Arbeloa by Ivan Strinic. Direct free kick taken by Alvaro Arbeloa.
Gerard Pique gives away a free kick for an unfair challenge on Mario Mandzukic. Free kick taken by Luka Modric.
Gordon Schildenfeld fouled by Fernando Torres, the ref awards a free kick. Stipe Pletikosa takes the direct free kick.
Free kick awarded for a foul by Mario Mandzukic on Gerard Pique. Gerard Pique restarts play with the free kick.
Corner taken right-footed by Hernandez Xavi, Header on goal by Fernando Torres from inside the box goes harmlessly over the target.
Ramos Jordi Alba sends in a cross, Gordon Schildenfeld makes a clearance.
Free kick awarded for a foul by Andres Iniesta on Darijo Srna. Direct free kick taken by Ivan Rakitic.
Free kick awarded for a foul by Mario Mandzukic on Sergio Busquets. Hernandez Xavi crosses the ball in from the free kick, Vedran Corluka makes a clearance.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.