MotoGP world champion Marc Marquez took pole position at the Grand Prix of the Americas with seconds to spare on Saturday after clambering over a wall and sprinting down pitlane to jump on his spare Honda.
Despite the bike drama with less than three minutes remaining in the session, the Spaniard still pulverised the motorcycle circuit lap record after being pushed down to seventh place.
Marquez's time of two minutes and 2.135 seconds, well inside his 2014 pole record time of 2:02.773 and the race lap record of 2:03.575, came on his final lap which he started seconds before the chequered flag.
Ducati's Italian Andrea Dovizioso, who took pole in the Qatar season-opener, will start the second round of the season on Sunday alongside Marquez with Spaniard Jorge Lorenzo third for Yamaha.
Italian Valentino Rossi, winner in Qatar for Yamaha, qualified fourth with Britain's Cal Crutchlow and Scott Redding fifth and sixth for the LCR Honda and Marc VDS Honda teams respectively.
Marquez had trouble with his bike earlier in the session when he struggled to re-start it in the pits.
He left it leaning against the pitwall, which he clambered over before breaking into a run to get back to the garage.
"Before the qualifying practice I had more or less everything under control," said Marquez after his 23rd MotoGP pole. "My plan was to push a little bit with the first tyre and with the second one push 100 percent.
"But when I passed with the second tyre, something happened...we don't know yet. And then I saw the warning and I stopped the bike and I ran to take the second bike," he added.
"Even that was not the correct front tyre and everything but I pushed 100 percent because we know that the front row and especially pole position was important because tomorrow will be a tricky race."
Marquez's stand-in team mate, Japanese rider Hiroshi Aoyama who has replaced Dani Pedrosa after the Spaniard had arm surgery, will start a distant 18th.
Image: Honda MotoGP rider Marc Marquez of Spain rides during the Qatar MotoGP Grand Prix at the Losail International circuit in Doha March 29, 2015.