Montreal - Sebastian Vettel put Ferrari on pole at the Canadian Grand Prix for the second consecutive year on Saturday, snatching top spot from Mercedes' Lewis Hamilton at the death with a breathtaking lap.
Vettel, who won from pole position last year in Canada to revive Ferrari's title hopes, will be hoping for the same on Sunday with world championship leader Hamilton, chasing a record equalling seventh win in Montreal, starting alongside him.
It was the German's first pole in 17 races and 56th of his career.
Vettel's team-mate Charles LeClerc will start third and Renault's Daniel Ricciardo a surprise fourth for his best qualifying effort of the season.
Red Bull's Pierre Gasly grabbed fifth on the grid and will start alongside the Mercedes of Valtteri Bottas, who could do no better than sixth after an early spin in the final session sent the Finn to the pits.
The importance of the pole was not lost on an emotional Vettel, who could not contain his jubilation, screaming his delight over the radio when his pit informed him "pole".
It was an eventful and dramatic qualifying session as Hamilton went first with the clock counting down, only to have Vettel bump him from top spot a tick later setting up what should be a fascinating duel on Sunday.
"I am full of adrenaline, you know what the feeling is when the car just keeps coming, you feel the grip and you go for it, that was one of those laps," smiled Vettel, who starts from pole for the first time since Hockenheim last year.
"I am very happy the last 17 races, the last weeks have been quite tough ones.
"I really enjoyed it, I wish I could do it again just for the fun of it.
"I had to pace to pace myself a bit in the first two corners because getting the tyres to grip up wasn't straight forward but after that it was just a joy the car was shouting, 'keep going, keep going'."
After taking pole and topping two of the three practice sessions, Ferrari will hope that translates into similar performance on Sunday as they look to end Mercedes' season-long domination on the island circuit named after Ferrari great Gilles Villeneuve.
Mercedes have swept all six races this season, five in a one-two formation, putting pressure on rivals Ferrari to get their challenge back on track.
"I think we gave it everything today, so I'm not disappointed," said Hamilton. The timing was right, our procedures were good and I did everything I could.
"Overall, I'm happy with the job we've done and it leaves us in a good position for the race.
"I'm glad I've been able to split the Ferraris today and tomorrow is going to be an interesting race.
"Hopefully we can put on a good show tomorrow."
If Ferrari was going to make a fight back it was expected to come in Montreal on a power sensitive track that plays to the Italian outfit's straight line speed which has been evident all week.
A win would certainly help Vettel's cause as he attempts to get back into the driver's championship fight.
Hamilton leads the standings 17 points clear of Bottas with Vettel 55 adrift of the Briton.
Red Bull's Max Verstappen spent much of qualifying complaining to his pit about traffic and a lack of grip but was ultimately undone when Haas's Kevin Magnussen crashed in front of him and he did not make the final round of qualifying.