An injury time goal from David Villa gave Spain a 2-1 win over Sweden in Innsbruck.
The victory almost guarantees Spain a place in the knockout stages of Euro 2008, while Sweden must now take something from their final game against Russia if they are to join them in the last eight.
Luis Aragones named the same starting line-up that overwhelmed Russia 4-1 in their opening group, but if he was hoping for more of the same from his players, he will have been disappointed as Spain were pushed all the way by a resilient Swedish side.
Spain wasted little time in displaying their fluid passing game and they took just fifteen minutes to take the lead. The goal came from a well-worked short corner which reached David Silva, whose cross picked out Fernando Torres and the Liverpool man was able to outmuscle his marker and prod the the ball into the net.
A minute later Sweden had a wonderful opportunity to level the scores when Henrik Larsson played a lovely pass into the path of Johan Elmander, but the winger sliced his shot into the side-netting when he would have been better advised to square the ball to his waiting teammates.
The opportunity appeared to galvanise Lasr Lagerback’s side and just after the half hour make they were back on level terms. Full-back Fredrik Stoor played a deep diagonal cross towards Zlatan Imrahimovic, who managed to evade the attentions of Sergio Ramos before curling in a shot that crept into the net.
On the stroke of half-time Spain had a good claim for a penalty turned down when Elmander clattered into Silva, but the referee, much to the consternation of the Spanish players, waved play on.
Sweden emerged after the break without Ibrahimovic who had come into the game carrying a knee injury. While Lagerback’s decision to rest the striker for next week’s game against Russia made sense, it also diminished Sweden as an attacking force.
Despite the fact that Sweden seemed bent on containment, Spain were struggling to get their own game going. Aragones responded by withdrawing Barcelona duo Iniesta and Xavi and introducing Cesc Fabregas and Santi Carzola.
The changes made little difference to what had now become a stodgy contest with Spain struggling to break down the massed ranks of the Swedish defence. The best opportunity fell to David Silva whose shot was saved by Andreas Isaksson only for the ball to rebound to David Villa whose effort was blocked by the keeper.
Futher chances fell to Spain, with Senna and Torres drawing good saves from Isaksson, but as the game wore on, Sweden looked set to hold on for a draw.
Then within the game in stoppage time, David Villa struck the winner for Spain. There looked little danger when Capdevilla launched a speculative clearance towards the Swedish box, Petter Hansson dithered, Villa nipped in and placed his shot past Isaksson.
Sweden 1-2 Spain
Sweden: Zlatan Ibrahimovic 34
Spain: Fernando Torres 15, David Villa 90+2
Sweden: 1-Andreas Isaksson; 5-Fredrik Stoor, 3-Olof Mellberg, 4-Petter Hansson, 2-Mikael Nilsson; 8-Anders Svensson, 19-Daniel Andersson, 9-Fredrik Ljungberg, 11-Johan Elmander (18-Sebastian Larsson 79); 10-Zlatan Ibrahimovic (22-Markus Rosenberg 46), 17-Henrik Larsson (16-Kim Kallstrom 87)
Spain: 1-Iker Casillas; 15-Sergio Ramos, 5-Carles Puyol (2-Raul Albiol 24), 4-Carlos Marchena, 11-Joan Capdevila; 19-Marcos Senna; 6-Andres Iniesta (12-Santi Cazorla 58), 8-Xavi (10-Cesc Fabregas 58), 21-David Silva; 7-David Villa, 9-Fernando Torres
Referee: Pieter Vink (Holland)