Lewis Hamilton has taken the outright championship lead just four races into his Formula One career by finishing second in the Spanish Grand Prix.
Alonso runs wide at the first corner, allowing Hamilton to pass him
But the McLaren driver could do nothing about Ferrari's Felipe Massa, who dominated at the Circuit de Catalunya to take his second win in succession.
Hamilton kept team-mate Fernando Alonso behind him to go two points clear of the world champion in the title chase.
The Spaniard survived an off-track moment on lap one to take third place.
Alonso's hopes of winning his home race were over almost before it began when he made an ambitous attempt to overtake Massa around the outside of the first corner.
After a good start from second place on the grid, the McLaren was marginally in front as they went into the turn but not far enough to claim the lead and the two cars touched, pitching Alonso sideways into the gravel trap.
To come out of my fourth Grand Prix leading the world championship is incredible
"I thought I was very much in front of him in the first corner - and he didn't think so - and we touched each other," Alonso said.
"It was dangerous. We were very lucky because 99% of the time in incidents like that you would finish the race in the first corner."
Massa countered: "I was inside, so I don't understand his point.
"As long as I am inside, I will stay there. I won't move. If anybody was aggressive, it was Fernando, not me.
"If I am wrong, then I am the first to say I have made a mistake.
"But this time don't tell me I've made a mistake. Come on, this is racing, Formula One, the first corner.
"The first corner is important. You don't want to lose like I did in Malaysia. I wanted to stay there.
Massa dominated the race once he had fended off Alonso
"There was contact. He tried to push me inside - it was only small contact - but fortunately nothing happened with the car."
Alonso lost only two places as he rejoined the track, slotting into fourth place behind Hamilton and Ferrari's Kimi Raikkonen, who was passed by the Englishman on the run down to the third corner.
But one of the aerodynamic deflectors on the world champion's car had been damaged, which will have affected his pace for the rest of the race.
Alonso moved up to third when Raikkonen retired with a rare Ferrari failure on lap 10, but he could not close on Hamilton, who was equally helpless in the face of the charging Massa.
The Brazilian edged steadily ahead in the lead and was nearly 10 seconds clear by the time he made his first pit stop on lap 19, the same time as Alonso.
Hamilton stayed out for another three laps but was no closer to the Ferrari when he rejoined the track after his own stop.
The first stops were the end of Alonso's already slim hopes of winning his home race for the second year in a row.
McLaren fitted the harder of the two tyre options to his car for his middle stint, while everyone else stayed on the softer tyres and saved the harder ones until the final push.
The plan was presumably for Alonso to limit the damage in the middle of the race and make a charge in the closing laps.
But he slipped back to more than 10 seconds behind Hamilton in the first few laps after the stops as the tyres took their time to come up to speed.
Alonso continued to lose ground to his team-mate throughout the second stint and was more than 16 seconds adrift by the time Hamilton made his second stop on lap 47.
Alonso followed him in a lap later and began to close on Hamilton after they rejoined, but in the final 10 laps the gap stabilised.
The eight points for second place put Hamilton two points clear of Alonso at the head of the drivers' championship, with Massa a further point behind.
"I keep saying I'm living my dream, and it's really true," Hamilton said.
"I've been working so hard for this and to come out of my fourth Grand Prix leading the world championship when I'm driving against two of the best drivers in the world is incredible."
BMW Sauber's Robert Kubica was fourth after a strong, steady race, with David Coulthard fifth following an impressive race in the much-improved Red Bull-Renault.
Massa survived this flash fire at his first pit stop
The Scot lost a gear in the closing stages and had to fight hard to hold off Nico Rosberg's Williams-Toyota.
Renault's Heikki Kovalainen, who was hampered by having to make an extra pit stop because of a faulty fuel rig, finished seventh.
Kovalainen's team-mate Giancarlo Fisichella, similarly hampered, lost the final points place to Super Aguri's Takuma Sato when he had to make a final splash-and-dash pit stop with seven laps to go.
Spanish Grand Prix result:
1. Felipe Massa (Brz) Ferrari one hour 31 minutes 36.230 seconds
2. Lewis Hamilton (GB) (McLaren-Mercedes) at 6.790sec
3. Fernando Alonso (Spa) McLaren-Mercedes at 17.456
4. Robert Kubica (Pol) BMW Sauber 31.615
5. David Coulthard (GB) Red Bull-Renault 58.331
6. Nico Rosberg (Ger) Williams-Toyota 59.538
7. Heikki Kovalainen (Fin) Renault 1:02.128
8. Takuma Sato (Jpn) Super Aguri-Honda) one lap behind
9. Giancarlo Fisichella (Ita) Renault 1 lap
10. Rubens Barrichello (Brz) Honda 1 lap
11. Anthony Davidson (GB) Super Aguri-Honda 1 lap
12. Jenson Button (GB) Honda 1 lap
13. Adrian Sutil (Ger) Spyker-Ferrari 2 laps
14. Christijan Albers (Ned) Spyker-Ferrari) 2 laps
R Nick Heidfeld (Ger) BMW Sauber 50 laps completed
R Ralf Schumacher (Ger) Toyota 48 laps
R Vitantonio Liuzzi (Ita) Toro Rosso-Ferrari 18 laps
R Scott Speed (USA) Toro Rosso-Ferrari 11 laps
R Kimi Raikkonen (Fin) Ferrari 10 laps
R Jarno Trulli (Ita) Toyota 9 laps
R Mark Webber (Aus) Red Bull-Renault 8 laps
R Alexander Wurz (Aut) Williams-Toyota 0 laps
Fastest lap: Massa, one minute 22.680 seconds, lap 14.
Key: R = retired