The rain that threw the European Grand Prix into chaos at the start gave the winning edge at the end to Fernando Alonso.
The two-time defending Formula One champion passed Felipe Massa of Ferrari on a slippery track late in Sunday's race.
The McLaren driver closed to within two points in the standings of leader Lewis Hamilton. The rookie was ninth, finishing out of the top three for the first time in 10 races this season.
"It was exciting to drive and I hope to watch," Alonso said.
"The rain at the end helped us a lot, I think we were better in wet conditions. Luckily, I had six laps to try to pass him. I enjoyed the race and the different conditions. I like the rain," he said.
Massa was eight seconds behind in second place, and Mark Webber was 1:05 back in third for Red Bull to equal his career best, at Monaco in 2005.
For Massa, the second place left a "bitter taste" after an unhelpful change of tires.
"I had driven a strong race right up until the last shower, then once I had the rain tires on, I immediately felt vibrations that made the car very unbalanced," Massa said. "I couldn't keep the pace, Fernando was faster."
Hamilton, who also drives for McLaren, leads Alonso 70-68. He started 10th on the grid following his crash in qualifying on Saturday.
Kimi Raikkonen, who started from the pole position but lost the lead in a chaotic start, pulled out in the 34th lap due to a hydraulics problem with his Ferrari.
The race was halted after four laps because of a heavy shower.
The rain returned with 11 laps left with Massa in the lead, ahead of Alonso.
Three laps later, it began to rain harder and both drivers went in for wet tires.
Alonso squeezed out Giancarlo Fisichella's Renault in the pit lane to get into position to attack Massa.
A great battle ensued over the next two laps and, with less than five laps remaining, the two touched wheels as Alonso pushed past Massa and went on to record his 18th career F1 victory.