(CNN) -- Daniel Ricciardo took advantage of a rare sign of vulnerability from the all-conquering Mercedes team to score his maiden victory in a thrilling finish to the Canadian Grand Prix Sunday.
The Red Bull rookie overtook title leader Nico Rosberg in the closing stages of the 70-lap race in Montreal and took the checkered flag under the safety car after Felipe Massa of Williams and Sergio Perez in his Force India crashed while battling for minor places.
It was an astonishing turn around after another race set to be dominated by Mercedes with title leader Rosberg battling to hold off teammate Lewis Hamilton for the honors.
The early stages had been marked by an early safety car when the two Marussias of Briton Max Chilton and Frenchman Jules Bianchi's collided on the first lap.
Rosberg, who started from pole, eventually came under pressure from Hamilton, who had initially lost second place to Vettel.
But both suffered power problems, allowing the pack to close up with Massa briefly taking the lead.
Hamilton finally passed Rosberg to take second, but then was forced to retire with a rear brake problem.
Rosberg, who reclaimed the lead, was unable to hold off the charging Ricciardo, but will be consoled by opening up a potentially decisive 22-point lead in the championship race over Hamilton.
In a fine day for Red Bull, four-time champion Sebastian Vettel completed the final podium spot, but has been beaten by his precocious teammate in the last five races.
"I am still a bit in shock," Ricciardo said at the presentations.
"Hamilton had a problem and Rosberg was slow down the straights," he revealed.
"I really struggled to get past (Sergio) Perez but managed to finally get a run out of the last chicane and get a nice run out of turn one and set my sights on Nico with couple of laps to go.
"I finally managed to get in the right spot to use DRS and it's an amazing feeling right now."
Rosberg, winner of the last race in Monaco, had made a brave attempt to hold on to his lead.
"I lost a lot of power in the straights but it did not quite work out. I couldn't hold off Daniel Ricciardo," he admitted.
Behind the front runners, Jenson Button took a fine fourth for McLaren with Nico Hulkenberg in fifth for Force India and Fernando Alonso sixth for Ferrari.
Finn Valtteri Bottas was seventh in the second Williams ahead of Frenchman Jean-Eric Vergne of Toro Rosso.
Danish rookie Kevin Magnussen in the second McLaren and Kimi Raikkonen in the second Ferrari completed the points scoring.
Perez and Massa, who walked away from their 240kph crashes, were classified 11th and 12th, scant consolation after both scented victory as Mercedes faltered.