Honda's Marc Marquez topped a red-flagged, rain-hit first MotoGP free practice ahead of the Valencia Grand Prix by 0.106 seconds from Jack Miller, who crashed late on.
Marquez spent much of the session occupying to top of the timesheets, and delivered a decisive lap of 1:39.767s on his final attempt to cement his position.
Heavy rain left the circuit in a treacherous state as the first MotoGP session of the weekend got underway, with the red flag being flown just 12 minutes in due to worsening track conditions.
Honda's Marquez led the timesheets just as the session was halted, having guided his RC213V to a 1:50.029s to go eight tenths clear of the shadowing Johann Zarco on the Tech3 Yamaha.
The session resumed after around a 20-minute delay, with Marquez reasserting his authority at the top of the timesheets, deposing sometime-session leader Miller with a 1:43.070s.
The world champion continued to raise the benchmark with a succession of quickest laps, culminating in the first sub 1:41s of the day with a 1:40.537s.
Miller's Pramac teammate Danilo Petrucci edged ahead of Marquez by 0.058s just five minutes later, and remained the pacesetter until the closing eight minutes, when Marquez reassumed control of the timesheets with a 1:39.787s.
Marquez came under some threat in the dying moments as Miller began to light up the timing screens with session-best sectors.
However, the Australian crashed going through Turn 10, while Marquez went even quicker on his last lap with a 1:39.767s.
Miller held onto second, 0.106s adrift, despite his tumble, while teammate Petrucci completed the top three ahead of Ducati stablemate Andrea Dovizioso.
Jorge Lorenzo made his return to action having missed the last four races with a wrist injury, and was a steady 19th at the end of FP1 with a 1:41.782s as he prepares for his Ducati farewell this weekend.
The retiring Dani Pedrosa began his final MotoGP race weekend fifth on the second works Honda, with Suzuki's Andrea Iannone shadowed by top Yamaha runner Maverick Vinales in sixth.
Ducati wildcard Michele Pirro was eighth ahead of KTM's Pol Espargaro and the sister Suzuki of Alex Rins to round out the top 10, while Valentino Rossi was 12th on his YZR-M1.
Alvaro Bautista, who will depart for World Superbikes after this weekend, began his final MotoGP weekend down in 21st after crashing late on at Turn 2. Avintia's Xavier Simeon [15th] also crashed, the Belgian coming off at Turn 14 just moments after Miller's tumble.