Jorge Lorenzo clinched pole position after topping the qualifying session for Sunday's Spanish MotoGP.
Spain's 2010 world champion, who won in Jerez last year, clocked one minute 39.532 seconds to edge countryman Dani Pedrosa and American Nicky Hayden.
Britain's Cal Crutchlow qualified fourth, 1.038 secs back, ahead of Australian Casey Stoner.
Seven-time world champion Valentino Rossi finished 13th, 3.4 seconds adrift of Lorenzo in a largely dry session.
The Yamaha rider, who won the season-opening Qatar race, recorded his 46th career pole position, including 20 in MotoGP.
"We are very happy with this pole position," said Lorenzo. "It was a strange session with a lot of wet patches so it was very dangerous. We have to pay a lot of attention to not crash but I was very patient."
Crutchlow said: "I crashed in the middle. We put a new tyre on and then I went out and hit a wet patch with the new tyre. It hurt a bit but I'm alright. I really hope the race is not ike this - half and half. All the riders would prefer a dry race but if it is wet let's hope it is completely wet. Half and half is a disaster for us."
Marc Marquez will start on pole in Moto2 with Britain's Bradley Smith qualifying 12th and Scott Redding 19th.
In Moto3, Spain's Alex Rins was fastest with Britons Danny Kent and Danny Webb 15th and 21st respectively.
Selected MotoGP qualifying times from Jerez:
1. Jorge Lorenzo (Spa) Yamaha 1 min 39.532 secs
2. Dani Pedrosa (Spa) Honda 1:39.667
3. Nicky Hayden (US) Ducati 1:40.563
4. Cal Crutchlow (GB) Yamaha 1:40.570
5. Casey Stoner (Aus) Honda 1:40.577
6. Ben Spies (US) Yamaha 1:41.090
7. Andrea Dovizioso (Ita) Yamaha 1:41.180
8. Alvaro Bautista (Spa) Honda 1:41.447
9. Stefan Bradl (Ger) Honda 1:41.550
10. Randy De Puniet (Fra) ART 1:41.700
13. Valentino Rossi (Ita) Ducati 1:42.961