Pramac Ducati's Johann Zarco ended fellow Frenchman Fabio Quartararo's dominant run of five consecutive MotoGP poles to go fastest in qualifying at the German Grand Prix on Saturday.
Yamaha's Quartararo set the early benchmark in the session before Zarco dug deep to post his fastest lap in one minute, 20.236 seconds.
Zarco's first pole since last year's Czech GP came under threat in the closing stages when he crashed out on Turn 4. But Quartararo pulled out of his final run to settle for second spot on the grid.
"I'm pretty happy. I was finally able to use the tyres at their best in the closing stages," Zarco said.
"I was still looking to push in the final lap and see what I can do. But I lost my front and couldn't control the bike. I just protected myself. It's all ok."
Aleix Espargaro strengthened his hopes of a podium charge after finishing third - scoring Aprilia's first front row spot in the premier class since the Australian Grand Prix in 2000.
Ducati's Jack Miller, third in the championship race, was fourth ahead of Repsol Honda's six-times premier class champion Marc Marquez, who has won the German race on his previous 10 attempts.
Quartararo's Yamaha team mate Maverick Vinales had a day to forget, recording his worst-ever MotoGP qualifying result to start in 21st.
Italian great Valentino Rossi fared a little better on his Petronas SRT Yamaha to take 16th place, ahead of Suzuki's reigning world champion Joan Mir.
Heading into Sunday's race at Sachsenring, Quartararo leads the championship race with 115 points, 14 clear of Zarco in second place.