Jorge Lorenzo made it a clean sweep during free practice at Jerez on Friday as the Movistar Yamaha rider left it late to topple Marc Marquez.
Lorenzo had set the initial pace on the YZR-M1 in 1m 40.005s but Repsol Honda's Marquez took over with a lap in 1m 39.900s on his sixth lap, which stood throughout the session until the final few minutes.
With four minutes to go, Lorenzo improved his time to 1m 39.957s to close to within a whisker of Marquez before the reigning MotoGP world champion upped the ante, setting a new benchmark of 1m 39.555s two minutes from the end to push Marquez back to second.
Championship leader Marquez was unable to improve his time on his final lap and held station behind Lorenzo, although Suzuki's Aleix Espargaro climbed three places from sixth to third as the chequered flag came out, lapping in 1m 40.093s.
Espargaro - using wings on the Suzuki for the first time - moved ahead of Avintia Racing's Hector Barbera, Valentino Rossi on the Movistar Yamaha and Espargaro's team-mate Maverick Vinales in sixth, who had a big moment at turn five earlier in the session.
Rossi's best lap was seventh tenths behind Ducati-bound Lorenzo, while Espargaro in third was half-a-second down on the factory Yamaha pacesetter, who was three tenths clear of Marquez in second.
Ireland's Eugene Laverty produced a brilliant final lap on the Aspar Ducati GP14.2 to haul himself into tenth place, lapping in 1m 40.925s as the 29-year-old finished ahead of Andrea Iannone on the factory GP16.
Andrea Dovizioso was seventh quickest on the Ducati GP16 ahead of Pramac's Scott Redding, while Dani Pedrosa was only ninth on the Repsol Honda, a whopping 1.3 seconds back on Lorenzo.
Yonny Hernandez was 12th fastest on the Aspar Ducati behind team-mate Laverty and Iannone, with British rider Cal Crutchlow – suffering from gout – down in 13th on the LCR Honda.
Pol Espargaro was 14th on the Monster Yamaha Tech 3 M1 ahead of Aprilia's Stefan Bradl, while Bradley Smith languished in 16th, 1.7 seconds behind the factory Yamaha of Lorenzo.
Smith looked uncomfortable on the satellite machine and ran wide off the track on the brakes as he continues to strive for a confidence-inspiring setting.
Loris Baz came off at final turn with seconds remaining and finished 17th overall on the Avintia Ducati ahead of Alvaro Bautista (Aprilia) and Michele Pirro (Pramac Ducati) – who again replaces the injured Danilo Petrucci.
Marc VDS Honda's Jack Miller and Tito Rabat brought up the rear in 20th and 21st respectively.
1. Jorge Lorenzo
2. Marc Marquez
3. Aleix Espargaro
4. Hector Barbera
5. Valentino Rossi
6. Maverick Viñales
7. Andrea Dovizioso
8. Scott Redding
9. Dani Pedrosa
10. Eugene Laverty
11. Andrea Iannone
12. Yonny Hernandez
13. Cal Crutchlow
14. Pol Espargaro
15. Stefan Bradl
16. Bradley Smith
17. Loris Baz
18. Alvaro Bautista
19. Michele Pirro
20. Jack Miller
21. Tito Rabat