Austin - Reigning world champion Marc Marquez captured pole position for the MotoGP Grand Prix of the Americas for the third straight year in dramatic style on Saturday.
The Spaniard, gunning for a third straight win in the Texas state capital, was stranded on the track when a warning light on his Honda came on with three minutes left in qualifying.
He had to sprint for his second bike, even as his rivals were producing their fastest laps.
He had been knocked down to seventh-fastest by the time he roared back onto the track on his spare machine, beating the deadline with seconds to spare and delivering a stunning flying lap.
It wasn't perfect his pole lap included a big late slide - but Marquez kept it together to return to the front of the grid with a Circuit of the Americas track-record of 2:02.135.
"I'm happy, because after having a problem we were able to come back and set the fastest time," Marquez said.
"It was rather different to what we are used to, because when I crossed the line for the first time with the second tyre I saw a warning light on the bike. When that happens, we are normally advised to shut off the engine," he added.
"I was able to get out again on the second bike and cross the line right at the cut-off point to put in a final lap, which worked out well for us."
"With the second bike the setup was not perfect, but I did 100 percent - also had a big moment," he said.
Italian Ducati rider Andrea Dovizioso was second in 2:02.474 - and stunned by Marquez's pole effort.
"I was watching him, and I couldn't believe my eyes," Dovizioso said.
Yamaha's Jorge Lorenzo of Spain was third-quickest in 2:02:540 and Lorenzo's team-mate Valentino Rossi, winner of the season-opening race in Qatar two weeks ago, was fourth-fastest in 2:02.573.
Britons Cal Crutchlow (2:02.613) and Scott Redding (2:02.674) were fifth and sixth-fastest.
Marquez is seeking to rebound after an early mistake in Qatar dropped him to the back of the field, leading to an eventual fifth-place finish.
He said gaining pole on Saturday was key in view of the fact that the area could be in for stormy weather on Sunday.
"It's important, because tomorrow we are expecting an eventful race with the unstable weather conditions," said Marquez, whose victory in the inaugural race in Austin two years ago was his first MotoGP triumph.
"If the race is dry, then I'm ready. If it's wet, then we will have to see how things go in the moment!"
Grid for Sunday's Grand Prix of the Americas at Austin, Texas, after qualifying on Saturday:
Marc Marquez (ESP/Honda) 2min 02.135sec, 2. Andrea Dovizioso
(ITA/Ducati) 2:02.474, 3. Jorge Lorenzo (ESP/Yamaha) 2:02.540, 4.
Valentino Rossi (ITA/Yamaha) 2:02.573, 5. Cal Crutchlow (GBR/Honda)
2:02.613, 6. Scott Redding (GBR/Honda) 2:02.674, 7. Andrea Iannone
(ITA/Ducati) 2:02.792, 8. Aleix Espargaro (ESP/Suzuki) 2:02.869, 9. Pol
Espargaro (ESP/Yamaha) 2:03.161, 10. Bradley Smith (GBR/Yamaha)
2:03.440, 11. Danilo Petrucci (ITA/Ducati) 2:03.741, 12. Maverick
Vinales (ESP/Suzuki) 2:03.754