Casey Stoner splashed to his fourth pole of the season with a dramatic fast lap in the seconds after the one hour qualifying session for Sunday's German Grand Prix had ended.
Yamaha rider Ben Spies was second with Repsol Honda rider Dani Pedrosa a close third.
The session was one of the most dramatic of the season, especially for Stoner. Before the hour was half over he had suffered an electrical failure that cut the engine spark on his number one motorcycle. That sent him to the pits for an extended stay while the rain intensified. At the time, Bavarian Stefan Bradl (LCR Honda MotoGP) was on top, giving the home fans a thrill.
The rain lightened in the final ten minutes and the riders headed back onto the 3.671Km track to reshuffle the order. Bradl lost the top spot with under nine minutes to run in what would be a flurry of changes. By the end of the qualifying hour the fast time had been lowered 11 times, by seven different riders, with Stefan Bradl setting fast time on three occasions and Stoner doing it once.
When the hour ended Stoner was on top, but would not be for long. About 15 seconds after the checkered flag was waved, the lead went to Cal Crutchlow, but he did not own it. In the next 17.5s the lead would change three more times; first Pedrosa, then Spies, and finally Stoner, who earned his second pole in a row and 39th MotoGP of his career with his lap of 1m, 31.796s.
"It was actually a very difficult session. We started off well and then we switched to our number one bike with a completely different set-up and that felt a lot better," Stoner said.
"On the first lap, I matched my best time I did on my second bike, then unfortunately on the second lap the engine gave up. We're not too sure what happened, if it was something electrical or if some water got in there, but we'll find out later. This put us on the back foot a little, because as soon as we came back and got the tyres ready on the second bike, it started to rain hard again, so we knew we wouldn't be able to get a better lap time in those conditions.
"We decided to wait for later in the session as we knew we wouldn't have much hope unless the conditions improved a little, and luckily they did. It ended up being a really good day for us and we'll see what we're capable of tomorrow," the Australian concluded.
Stoner will start Sunday's eighth round of the MotoGP World Championship tied on points with Lorenzo.
Ben Spies will start from second with Pedrosa joining Stoner on the front row, having qualified only .285s slower.
Qualifying position
1 Casey Stoner 1m31.796s AUS HONDA Repsol Honda Team
2 Ben Spies 0.193 USA YAMAHA Yamaha Factory Racing
3 Dani Pedrosa 0.285 SPA HONDA Repsol Honda Team
4 Cal Crutchlow 0.492 GBR YAMAHA Monster Yamaha Tech 3
5 Jorge Lorenzo 0.585 SPA YAMAHA Yamaha Factory Racing
6 Stefan Bradl 0.714 GER HONDA LCR Honda MotoGP
7 Nicky Hayden 0.999 USA DUCATI Ducati Team
8 Andrea Dovizioso 1.409 ITA YAMAHA Monster Yamaha Tech 3
9 Valentino Rossi 1.421 ITA DUCATI Ducati Team
10 Aleix Espargaro 2.104 ESP ART Power Electronics Aspar
11 Alvaro Bautista 2.292 SPA HONDA Honda Gresini
12 Hector Barbera 2.746 SPA DUCATI Pramac Racing Team
13 Colin Edwards 2.853 USA SUTER NGM Forward Racing
14 Randy De Puniet 2.855 FRA ART Power Electronics Aspar
15 Mattia Pasini 3.142 ITA ART Speed Master
16 Danilo Petrucci 3.794 ITA IODA Came IodaRacing Project
17 Michele Pirro 3.799 ITA HONDA Honda Gresini
18 Yonny Hernandez 4.166 COL BQR Avintia Racing MotoGP
19 Ivan Silva 4.387 ESP BQR Avintia Racing MotoGP
20 James Ellison 4.559 GBR ART Paul Bird Motorsport
21 Franco Battaini 4.642 ITA DUCATI Cardion AB Motoracing