Seven-time MotoGP champion Valentino Rossi was quickest on the second day of pre-season testing in Jerez.
Rossi, 34, is back riding for Yamaha this season and managed a best lap of one minute 39.525 seconds, edging out team-mate and current world champion Jorge Lorenzo by just 0.15 seconds.
British rider Cal Crutchlow was third on his Tech 3 Yamaha, with Dani Pedrosa fourth and Andrea Dovizioso fifth.
The test concludes on Monday ahead of the first race in Qatar on 7 April.
Lorenzo ended Saturday's opening day of testing
on top, but the day was mainly wasted due to the rain at the Spanish circuit.
But conditions were much better on Sunday, with Rossi managing 46 laps before the rain returned to end the day early.
Rossi won the last of his seven titles for Yamaha in 2009 and is back with the Japanese team after two poor seasons at Ducati.
Crutchlow's British team-mate Bradley Smith was 12th quickest, with Northern Irishman Michael Laverty a disappointing 24th.
Alvaro Bautista suffered fractures to the fourth and fifth fingers on his left hand and a right knee strain after he crashed, but still ended the day in sixth.
Crutchlow said: "The pleasing aspect was I was very consistent and that makes me confident for when we come back for the race here. The fact that the top three was filled by Yamaha also bodes well for the race in a few weeks.
"I am right in the mix with the factory bikes again and this is very satisfying for me."
Selected Sunday times at MotoGP testing, Jerez
1. Valentino Rossi (Ita) Yamaha 1:39.525
2. Jorge Lorenzo (Spa) Yamaha 1:39.540
3. Cal Crutchlow (GB) Tech 3 Yamaha 1:39.574
4. Dani Pedrosa (Spa) Repsol Honda 1:39.630
5. Andrea Dovizioso (Ita) Ducati 1:40.322
6. Alvaro Bautista (Spa) Gresini Honda 1:40.686
7. Marc Marquez (Spa) Repsol Honda 1:40.714
8. Stefan Bradl (Ger) LCR Honda 1:40.783
9. Andrea Iannone (Ita) Pramac Ducati 1:41.088
10. Nicky Hayden (USA) Ducati 1:41.325
12. Bradley Smith (GB) Tech 3 Yamaha 1:41.398
24. Michael Laverty (GB) PBM 1:44.185