Fabio Quartararo pipped Marc Marquez to claim pole position at the Catalunya Grand Prix just 11 days after undergoing arm surgery.
Rookie Quartararo went under the knife in Barcelona after finishing 10th at the Italian Grand Prix with the intention of coming back for the next race this weekend, and the Frenchman's impressive ride in Q2 ensured he will lead out the riders on Sunday.
The Petronas Yamaha rider became the youngest man to start a MotoGP race on pole at the Spanish Grand Prix last month, though he is still yet to finish higher than seventh in his maiden campaign.
Championship leader Marquez secured second spot on the grid, having earlier been spotted angrily remonstrating with team-mate Jorge Lorenzo during FP3.
It was a fine day for Yamaha, with Quartararo's team-mate Franco Morbidelli in fourth and Monster Energy duo Maverick Vinales and Valentino Rossi sandwiched either side of him.
Quartararo had served a warning to his rivals on Friday when his arm did not appear to be troubling him as he topped the timesheets.
Vinales led the field out for Q2, though, only to see both Quartararo and then Marquez go quicker.
Marquez's bid to overhaul Quartararo was ended when he slid at turn four, only just managing to keep control of the bike, but the incident dashed his hopes of claiming pole.
1. Fabio Quartararo (Petronas Yamaha) 1:39.484secs
2. Marc Marquez (Repsol Honda) +0.015s
3. Maverick Vinales (Monster Energy Yamaha) +0.226s
4. Franco Morbidelli (Petronas Yamaha) +0.227s
5. Valentino Rossi (Monster Energy Yamaha) +0.269s
6. Andrea Dovizioso (Ducati) +0.293s
7. Danilo Petrucci (Ducati) +0.360s
8. Alex Rins (Suzuki) +0.386s
9. Cal Crutchlow (LCR Honda) +0.667s
10. Jorge Lorenzo (Repsol Honda) +0.715s