Aleix Espargaro threw in a spectacular late lap to snatch the top spot at Barcelona in opening practice for MotoGP's Catalunya Grand Prix.
Forward Yamaha Open class rider Espargaro's last-minute 1m41.672s put him 0.729 seconds clear of the field.
Until that point, factory Yamaha man Jorge Lorenzo had looked set to take Friday morning honours, as his early 1m42.401s effort kept him in front.
Yamaha held a one-two for much of the session, with Valentino Rossi 0.022s slower than his team-mate.
That formation was broken when Pramac Ducati rider Andrea Iannone tucked in behind Marc Marquez and did a lap 0.010s slower than Lorenzo and 0.002s faster than Rossi in the final minutes.
Championship leader Marquez then embarked on a lap that had the potential to put him on top, only for it to be disrupted when Iannone overtook him.
But the Italian did not get much further, braking too late for the hairpin at the end of the back straight and skating into the tyre wall. He retained third overall between the Yamahas.
Marquez ended up only seventh, behind factory Honda team-mate Dani Pedrosa and LCR's Stefan Bradl.
Alvaro Bautista, Yonny Hernandez and Pol Espargaro rounded out a top 10 that did not feature any factory Ducatis.
Nicky Hayden completed 15 laps as he tried to assess his fitness following his recent wrist surgery.
The American outpaced Aspar team-mate Hiroshi Aoyama by four tenths, but Leon Camier is on standby to replace Hayden for the rest of the weekend if he decides he cannot continue.
Danilo Petrucci - the other rider with fitness doubts - has already made that decision.
The Ioda rider, still hampered by an arm injury from a Jerez crash, withdrew on Thursday night and has been replaced by Michel Fabrizio again.
Pos Rider Bike Time Gap Laps 1. Aleix Espargaro Forward Yamaha 1m41.672s 15 2. Jorge Lorenzo Yamaha 1m42.401s +0.729s 17 3. Andrea Iannone Pramac Ducati 1m42.411s +0.739s 19 4. Valentino Rossi Yamaha 1m42.423s +0.751s 19 5. Stefan Bradl LCR Honda 1m42.620s +0.948s 18 6. Dani Pedrosa Honda 1m42.664s +0.992s 18 7. Marc Marquez Honda 1m42.742s +1.070s 19 8. Alvaro Bautista Gresini Honda 1m42.833s +1.161s 18 9. Yonny Hernandez Pramac Ducati 1m42.960s +1.288s 18 10. Pol Espargaro Tech 3 Yamaha 1m43.001s +1.329s 19 11. Andrea Dovizioso Ducati 1m43.456s +1.784s 18 12. Michele Pirro Ducati 1m43.644s +1.972s 13 13. Bradley Smith Tech 3 Yamaha 1m43.718s +2.046s 21 14. Cal Crutchlow Ducati 1m43.905s +2.233s 13 15. Scott Redding Gresini Honda 1m43.912s +2.240s 18 16. Nicky Hayden Aspar Honda 1m43.988s +2.316s 17 17. Colin Edwards Forward Yamaha 1m44.008s +2.336s 15 18. Hector Barbera Avintia FTR-Kawasaki 1m44.020s +2.348s 16 19. Karel Abraham Cardion Honda 1m44.186s +2.514s 17 20. Michael Laverty PBM Aprilia 1m44.450s +2.778s 17 21. Hiroshi Aoyama Aspar Honda 1m44.471s +2.799s 20 22. Broc Parkes PBM Aprilia 1m44.681s +3.009s 15 23. Mike di Meglio Avintia FTR-Kawasaki 1m45.892s +4.220s 15 24. Michel Fabrizio Ioda Aprilia 1m47.297s +5.625s 16