Jorge Lorenzo edged fellow Spaniard Dani Pedrosa in an extremely tight battle for MotoGP pole position at Jerez.
With the expected rain never truly materialising, the track was able to dry throughout the hour-long session, leading to a flurry of improvements in the final minutes.
Pole turned out to be a straight fight between the Yamaha of Lorenzo and the Honda of Pedrosa, both of whom lowered the benchmark and traded places on an almost lap-by-lap basis in the final five minutes.
Lorenzo's penultimate effort, a 1m39.532s, ultimately proved enough, putting him just over one tenth clear of Pedrosa.
No other rider was able to get within one second of Lorenzo, with Ducati's Nicky Hayden 1.031s down in third.
"We are very happy with this pole," Lorenzo said. "It was a strange session because of the water so you had to pay a lot of attention and not crash. I was patient and started late, and now we see what happens in the race."
Hayden's late effort served to deprive Tech 3 Yamaha's Cal Crutchlow of a front row start, the Briton having been fastest at the halfway mark. A fall disrupted his rhythm, but on the second chassis and worn slicks he was able to do enough to secure fourth, ahead of the second works Honda of reigning champion Casey Stoner.
The Australian was never able to match his team-mate's pace, and had to abandon his final tour when he ran wide at Turn 1.
Ben Spies (Yamaha) completes the second row, ahead of Crutchlow's Tech 3 team-mate Andrea Dovizioso, Gresini's Alvaro Bautista and LCR Honda's Stefan Bradl.
It was another disastrous session for Valentino Rossi. Despite going out in the final minutes - prime conditions - he wound up 13th fastest, 2.3s down on his team-mate Hayden.
That means he starts behind the lead CRT bike of Randy de Puniet, who was 10th for Aspar, and both satellite Ducati bikes.
Colin Edwards finished bottom of the pile after crashing heavily at the halfway mark.