Jacques Boissinot, Associated Press
BMW Sauber driver Robert Kubica of Poland gives the thumbs up after winning the Canadian Grand Prix on Sunday.

MONTREAL — It was just a routine pit stop until Robert Kubica got to the end of pit road.

The BMW Sauber driver was stopped at a red light, waiting impatiently after his first stop of the day to rejoin the action Sunday in the Canadian Grand Prix, when the action suddenly took place right next to him.

Defending race champion Lewis Hamilton smashed his Mercedes McLaren into the Ferrari of reigning world champion Kimi Raikkonen, sitting alongside Kubica at the stoplight.

"Kimi stopped beside me, and then I heard the noise when Hamilton crashed into his car," Kubica said. "I have to be grateful to Lewis as he chose Kimi and not myself. I just kept concentrating on waiting for the green light and managed to pull away."

In the end, the 23-year-old Polish driver pulled away from everyone, taking advantage of Hamilton's uncharacteristic mistake to grab his first Formula One win in his 29th start. Kubica also moved into the series points lead as well as giving BMW Sauber its first F1 victory in its 42nd grand prix.

Nick Heidfeld gave the team a 1-2 finish, with Red Bull Racing's David Coulthard third.

As Kubica crossed the finish line 16.4 seconds ahead of his teammate — so far in front that the runner-up wasn't even in sight on the 2.71-mile track — BMW racing boss Dr. Mario Theissen radioed, "That's a historic win, Robert. You are leading the championship points."

The Polish driver's simple answer: "Thanks."

He did show his excitement in the cockpit, pumping one fist in the air and then the other. Then he hugged everyone within reach after getting out of his car.

A year ago, Kubica wound up being helicoptered to a hospital for a checkup after a spectacular crash late in the race. He was shaken up but not injured and Kubica proved on Sunday that memories of that frightening accident have not lingered.

"After that big shunt last year, it's great to win this season and not have to talk about that anymore," he said.

Kubica, who also has two second-place finishes this season, could still be looking for that first win if not for Hamilton's surprising pit road gaffe.

Hamilton, coming off a win at Monaco, started on the pole for the second straight year at Circuit Gilles Villeneuve and led until the safety car came out and the leaders pitted on lap 19 of the 70-lap race. That followed Adrian Sutil parking his Force India entry on the grass alongside the track.

Raikkonen, who came into the race trailing Hamilton by three points in the championship standings, was running third before the pit stop. But Hamilton's stop was a bit slow and Raikkonen came out ahead of the Englishman and just behind Kubica, who had been second.

It appeared Hamilton never hit the brakes, picking up speed and ramming into Raikkonen's car, knocking off the rear wing. Nico Rosberg then hit the rear of Hamilton's car.

Both Hamilton and Raikkonen quickly climbed from their damaged cars and the Finnish world champion tapped Hamilton on the helmet as he walked past, pointing toward the light. Hamilton, obviously angry at himself, pushed past several cameras in the McLaren garage.

"Before my pit stop, everything looked on course for the perfect result," Hamilton said after cooling off. "We were so quick, we were breezing it, in fact. But it wasn't a great pit stop and, as I exited the box, I saw two cars jostling for position ahead of me in the pit lane.

"Obviously, I didn't want to get involved in their tussle and was trying not to do so. Then, all of a sudden, they stopped. And, by the time they come to a halt, it was too late for me to avoid them. It's just unfortunate when stuff like this happens."

Raikkonen was disgusted and not very forgiving.

"My race was ruined by Hamilton's mistake," the Finn said. "Obviously, anyone can make mistakes, as I did two weeks ago in Monaco. But it's one thing to make a mistake at 200 per hour, but another to hit a car stopped at a red light."

After the race, officials announced that Hamilton and Rosberg will be penalized 10 positions on the starting grid at the next event, the French Grand Prix on June 22.

Several cars, working on doing the race with only one pit stop, were ahead of Kubica when he came out of the pits. But he finally found himself in first place on lap 42.

"The last car (that) went in for the first pit stop was (Timo) Glock and that left me with a clear track," Kubica said. "I knew I had to make a 21-second gap and I managed to get 24, so it was really a great race."

The Pole easily stayed out front as he made his last pit stop on lap 49. After getting back on track just over 4 seconds in front of Heidfeld, Kubica steadily pulled away to the end and never had a close call on a very treacherous track that caused problems for numerous drivers throughout the race.

"The last laps were very, very difficult," Kubica said. "(The team) was saying 'Don't push so much' and I was already not pushing already for 10, 15 laps. It was just amazing, as soon as you go off-line, you have tires destroyed. It was like sandstorm. It was very, very difficult."

Glock finished fourth in a Toyota, followed by the Ferrari of Felipe Massa, the Toyota of Jarno Trulli, Rubens Barrichello's Honda and, in the final points position, Sebastian Vettel of Toro Rosso, who had to start at the back of the 20-car field after crashing in Saturday's practice.

Kubica leads the standings after seven of 18 races with 42 points, followed by Hamilton and Massa tied for second with 38 and Raikkonen with 35.