Spain clinched a place in the quarter-finals of Euro 2008 as David Villa's last-gasp winner sealed a 2-1 victory over Sweden in Innsbruck.
Spain coach Luis Aragones stuck with the same eleven who started in the 4-1 victory over Russia, while Sweden were without Niclas Alexandersson and Christian Wilhelmsson due to injury, with Fredrik Stoor and Johan Elmander drafted in.
The opening minutes saw no clear chances for either side, with both goalkeepers enjoying a quiet introduction to the game.
However, that all changed in the 15th minute as a short corner on the Spain left was whipped into the area by David Silva and Fernando Torres stuck out a boot to direct the ball past Andreas Isaksson inside his near post.
That goal prompted Sweden to respond and almost straight away Johan Elmander wasted a good opening as he fired a shot into the side-netting from 15 yards out.
Henrik Larsson then lifted an effort high over the top following an astute pass into the area by Zlatan Ibrahimovic, as the Swedes kept up the pressure.
Eleven minutes before the interval they were level as Stoor crossed to the far post from the right and Ibrahimovic fought off Sergio Ramos before beating Iker Casillas with a low shot.
Right on half-time Spain thought they should have been awarded a penalty as Elmander crashed into Silva, but Dutch referee Mr Vink waved play on.
Sweden suffered a blow at the interval as goalscorer Ibrahimovic was forced out of the action by a knee injury.
The opening 20 minutes of the second period saw few chances, with neither side able to forge a meaningful opening, but Spain should have re-taken the lead shortly after the hour mark.
Isaksson blocked Silva's initial shot before bravely smothering the follow-up from Villa, before the loose ball was turned away for a corner following Torres' effort on goal.
With just over 20 minutes to play Marcos Senna drove into space and unleashed a fine 30-yard drive which was parried away for a corner by the rock-solid Isaksson.
Petter Hansson almost opened up the Spain defence following a deep free-kick to the far post, before Torres drew another smart save from Isaksson with a stinging 25-yard drive.
Then, deep into stoppage time, a long ball forward was missed by a couple of Swedish defenders and Villa swooped to place a fine, low shot under the advancing Isaksson to win the game and send Spain into the last eight.