French rider Fabio Quartararo denied MotoGP champion Marc Marquez a home pole position in qualifying for the Catalunya Grand Prix on Saturday.
The 20-year-old Petronas Yamaha rookie, who had surgery to his right arm 11 days ago and also crashed in final practice, lapped the Circuit de Catalunya with a fastest time of one minute 39.484 seconds.
His lap was a mere 0.015 quicker than Honda's championship leader.
Maverick Vinales made it two Spaniards on the front row with the third fastest lap for the factory Yamaha team.
The pole was the second of Quartararo's first season in MotoGP, following on from becoming the youngest ever pole-sitter in the top category at the Spanish Grand Prix at Jerez in May.
The Frenchman won the second tier Moto2 race in Barcelona last year.
Petronas Yamaha's Franco Morbidelli led an all-Italian second row, ahead of Italian Valentino Rossi on the other works Yamaha and Ducati's title contender Andrea Dovizioso lining up sixth on the grid.
The top 12 riders on the grid were separated by less than a second.
Spaniard Jorge Lorenzo, last year's winner in Barcelona for Ducati and now Marquez's team mate, qualified 10th.
Marquez leads Dovizioso by 12 points in the standings after six rounds of the 19-race championship.