MONTE CARLO, Monaco — Lewis Hamilton overcame an early accident and wet conditions Sunday to win the Monaco Grand Prix and take the lead in the Formula One standings.

The McLaren driver, who started third on the grid, finished 3 seconds ahead of BMW Sauber's Robert Kubica, while pole sitter Felipe Massa of Ferrari was third at Formula One's most famous race.

"This is going to be the highlight of my career," Hamilton said after giving McLaren its 15th win in 26 races in the principality. "I stayed optimistic and brought it home. It was the most fun I've had in a race, ever."

The 23-year-old Briton swiped the wall early on but took advantage of Massa's mistake on the slick street circuit to earn his sixth career win.

Massa, starting from pole, ran off the track 16 laps in to lose the lead with Hamilton able to make up the difference.

"I just went over the line and I couldn't stop the car," the Brazilian said. "The track was getting dry and dryer and we expected rain ... and it didn't come. Unfortunately, the strategy didn't work."

Hamilton improved to 38 points in the overall standings, three better than defending world champion Kimi Raikkonen, who finished out of the points in ninth. The Ferrari driver's poor day began with a drive-through penalty and culminated with an accident involving Force India driver Adrian Sutil.

Massa is third with 34 points and Kubica next on 32.

Hamilton hung on despite seeing a 40-second advantage erased with 20 minutes remaining when the safety car emerged after Nico Rosberg of Williams crashed.

"The pace I had was ridiculous," said Hamilton, the first Englishman to win at Monaco since Graham Hill in 1969. "I just kept it cool at the end."

Red Bull's Mark Webber was fourth ahead of Sebastian Vettel of Toro Rosso. Rubens Barichello of Honda, Kazuki Nakajima of Williams and Heikki Kovalainen rounded out the places in the points.

The morning rain came and went as drivers took on the tight street circuit without the banned driver aids that help improve traction control.

Kovalainen, fourth on the grid, had to start last after stalling before the formation lap.

Hamilton was sandwiched between the Ferraris after moving ahead of Raikkonen in a clean start for the 20-car field.

Showers picked up and shooting spray had lap times nearly 20 seconds slower than Saturday's qualifying and Hamilton pitted six laps in after his right rear tire brushed the wall.

David Coulthard lost control of his Red Bull car for the second straight day to crash out before Toro Rosso's Sebastien Bourdais reared into him to bring out the safety car for the first time. Six drivers would retire as the 78-lap race was transformed into a clock countdown with Hamilton in front at the end.

Raikkonen was then dealt a drive-through penalty for not fitting his tires in time to start the race and the Finn dropped to fourth behind Hamilton, with Kubica trailing Massa.

After the start, Massa underbraked to run off the track at the first corner to give Kubica the lead. It only got worse.

"I lost the radio for like 20 laps. I couldn't talk to the team, I just looked at the board," Massa said. "It wasn't easy to know what was going on in the race."

Raikkonen was soon in the pits to change his front wing after running off at the same spot as Massa.

Hamilton, who won a wet Japan GP last year, was 17 seconds ahead at the halfway point and with the track drying out, he set another fastest lap — 3 seconds better than Massa — to push out his lead. The McLaren driver was clear with only the weather to worry about after a quick pit after 54 laps and the dry tires fitted.

Massa and Kubica would swap places before the Pole took second for good as the Brazilian emerged from his final stop with the softer tires.

Sutil was set to score Force India's first points with a fourth-place finish before Raikkonen ran into him with 7 minutes remaining.

The glamor of Monaco's race carried into the pit lane with film director Quentin Tarantino, actress Michelle Yeoh, entertainment mogul Sean "P. Diddy" Combs and tennis star Boris Becker all on hand.