Sebastian Vettel put Ferrari on pole at the Canadian Grand Prix for the first time since Michael Schumacher in 2001 while Formula One championship leader Lewis Hamilton qualified fourth for Mercedes
Vettel, 14 points behind the Briton, will start from the front for the fourth time in Canada after setting a track record of one minute 10.764 seconds at the sun-baked Circuit Gilles Villeneuve.
Hamilton had been hoping for a record seventh Canadian pole, at the track where he took his first win in 2007, but instead was out-qualified by Finnish team mate Valtteri Bottas who joined Vettel on the front row.
The top four all lapped inside the one minute 11 seconds mark.
"I got the job done. Yesterday we were a bit in trouble. I wasn't really happy with the car, we had some problems and I couldn't get the rhythm," said Vettel.
"Today we switched on. The car was incredible, it just kept getting quicker. In my final lap I had a small mistake otherwise I think there was a little bit more. But it was fantastic."
Red Bull's Max Verstappen, who could have become the youngest driver ever to take pole, dominated all three practice sessions but the 20-year-old could not keep pace with the Ferraris when it mattered most.
The Dutchman will line up third.
Hamilton will still be chasing a fourth consecutive win in Montreal on Sunday to equal Schumacher's mark of seven victories at an island circuit named after Canada's late Ferrari great.
"It was just a difficult session. The laps weren't great laps," said the Mercedes driver.
"Our race pace was good yesterday. Our single lap was good too, but today it just didn't come together. Ferrari did a better job today and that's just the way it is."
Ferrari's Kimi Raikkonen qualified fifth fastest and will be joined on the third row by Red Bull's Daniel Ricciardo, winner in Monaco two weeks ago and the last man to beat Hamilton to victory in Canada.
New Zealand's Brendon Hartley was 12th in his Toro Rosso.
"I was really happy with the job I did today, and how we've worked as a team throughout the weekend to get the car in the right place. I think 12th was more or less where we've been this weekend, there was probably another tenth in the car on that last lap, but to move much further up the grid and into Q3 was a bit of a tall order today.
"I've really enjoyed driving the track here, it's got a lot of character, bumps, kerbs, you're close to the walls… I felt strong all weekend in Monaco as well but Q1 was a bit of a mess and we missed Q2, so it was nice to get a better result in Montreal. I'm quite optimistic for tomorrow! The upgrade performance in qualifying was good, and we think the bigger step is in the race trim which is where we have been struggling recently. Hopefully we can battle it out and try to muscle our way into the top 10 - everything has been really positive so far and we've seen races in the past here where a lot can happen, so I'll keep focussed and do my best to bring home some points," Hartley said.