Mark Webber took a dominant victory for Red Bull at the Spanish Grand Prix as McLaren's Lewis Hamilton lost second place in a dramatic finish. Webber led from pole to flag, but Hamilton had out-raced Sebastian Vettel in the other Red Bull before a puncture forced the Englishman out.
That promoted Fernando Alonso's Ferrari to second, ahead of Vettel, who also hit trouble in the closing stages.
Mercedes's Michael Schumacher was fourth from Jenson Button's McLaren.
Vettel looked to have lost third place when he ran into problems in the closing laps.
The German came into the pits after running off the track with 12 laps to go following a brake failure, and when he rejoined, he was warned by his team that the problem was "critical" and that he needed to nurse his car to the finish.
"The lap after [the pit stop] I got the call to come in and retire and I said is there no way to continue?" said the 22-year-old.
"I wanted to stay out and try to get some points, I was thinking two or three, but in the end I finished on the podium, so I think, like it or not, it was a very lucky day."
Felipe Massa's Ferrari took sixth, just over a second behind Button, while Force India's Adrian Sutil held off the Renault of Robert Kubica for seventh.
Rubens Barrichello was ninth for Williams after driving a superb first lap to jump up from 17th on the grid to 12th, with Toro Rosso's Jaime Alguersuari promoted to 10th by Hamilton's misfortune.
The result has tightened an already close championship battle.
Button retains his lead, but it has been cut to just three points by Alonso, who jumps from third to second.
Vettel is 10 points adrift of Button in third place, and a further seven ahead of Webber.
Hamilton, who would have been just a point behind Button if he had finished second, is sixth, 21 points off the lead.
McLaren said after the race that they thought his left-front puncture had been caused by debris on the track first damaging the wheel.
Webber was untouchable after a few nervous moments at the start, when had to fight off challenges from Vettel, Hamilton and Alonso into the first corner.
Hamilton and Alonso used their
wing-stalling aerodynamic devices to close up on the Red Bulls into the first corner, but they were unable to gain any positions, and they slotted into third and fourth places for the first stage of the race.
Webber settled down to make the race his own, able to pump out fastest laps at will before easing off to ensure there were no problems with his car.
"I'm absolutely rapt," said the Australian. "We knew it was a long run to the first corner here.
"It was a very important part of the race to get out of Turn One still in the lead, it was pretty tight, and then just settle into a rhythm. We just controlled the gap really."
Vettel was unable to match his team-mate's pace. He was four seconds behind Webber when he made his pit stop on lap 16, a lap before the Australian and Hamilton.
Usually, stopping earlier is an advantage, as it gives a driver an extra lap on quicker, new tyres.
But Vettel was delayed by a problem with a front wheel nut and Hamilton, who had been 2.5secs behind Vettel when he stopped, actually came out of the pits as Vettel was coming down the pit straight.
They headed into the first corner side-by-side, with Hamilton inside Vettel, but still having to go around the outside of the Virgin of Lucas di Grassi, who was trying to stay out of the way.
As Vettel was forced to take to the run-off area, Hamilton swooped around him into second place.
Given Webber's pace, and the close-to-one-second advantage the Red Bulls had in qualifying, Vettel might have been expected to challenge Hamilton.
But the Englishman was able to build a lead of a couple of seconds and maintain it.
Vettel said: "A lot of things went wrong. I was not quick enough. I struggled a lot with the balance of the car.
"Then I think we came in too early, probably expecting Lewis to come in on the same lap but it didn't work out that way.
"It was very close with Lewis, there was no way to avoid contact and I went wide.
"Then surprisingly I had a brake failure and went off in Turn Seven, and was just lucky in the end to bring the car home."
The pit stops were also costly for Button, who ran fifth in the early laps. and a problem with his left-front wheel dropped him behind Schumacher.
The veteran German was considerably slower than Button but, try as he might, the world champion was unable to find a way by, despite his straight-line speed advantage, as the two were dropped by the top four by as much as a second a lap.
After several laps of Button applying intense pressure, and Schumacher using all his guile to hold the Englishman back, the seven-time champion was able to squeeze out a small advantage and secure his position.
Spaniard Alonso said: "It was a fantastic weekend for us, some unexpected positions. But we saw we need to improve the car.
"Sometimes we will be third, sometimes we will be fifth, sometimes we will be first. As long as we do 100% each time we can be satisfied, so we have to be happy with this race."
BBC Sport - F1 - Mark Webber wins in Spain but Lewis Hamilton crashes out