Spain's Jorge Lorenzo, riding a Yamaha, clinched pole position for Sunday's season-opening, floodlit Qatar MotoGP on Saturday after clocking the fastest time in qualifying.
Lorenzo was 0.221sec faster than reigning world champion Casey Stoner of Australia, on a Honda, and 0.388sec ahead of fellow Yamaha rider, Cal Crutchlow of Britain.
Lorenzo, the 2010 world champion, recorded the 45th pole of his career and 18th in the elite MotoGP class.
His performance represented a stunning turnaround in his fortunes in Qatar after Stoner had dominated the first two practice sessions before Lorenzo clocked the fastest lap in the third session of practice on Friday.
Four-times a winner in Qatar in the 125cc and 250cc classes, Lorenzo will be on the front row in Doha for the ninth time.
But Stoner cannot be written off with the Australian having won four times in the MotoGP division in his six visits to the Losail circuit.
"I am really happy with tonight's result. I had to push more than 100% to make pole position but I pushed to the limit and managed to make a perfect lap," said Lorenzo.
Signup to our newsletter and follow us on Facebook and Twitter!
"We still have to improve the power on the straight and our maximum speed but in the rest of the track the bike is working really well. Tomorrow will be a tough race and tyres will be very important I think."
Stoner was unhappy with his performance and predicted a long, hard race on Sunday.
"I'm not really happy with how qualifying went for us, it should have been a lot better especially on the soft tyre which we hadn't used all weekend," he said.
"Last night we were happy with what we had improved and with the set-up in general. Then tonight we tried to improve that set-up and we just made it worse and worse.
"In the end we did a full circle and came back to what we had on Thursday night. If we can make a big step forward in warm up then we can challenge for a podium and maybe fight for the win, but if the bike remains as it is at the moment, then we were going to be in for a long hard race."
America's Ben Spies, on a Yamaha, was fourth fastest ahead of Ducati's Nicky Hayden.
But seven-time MotoGP world champion Valentino Rossi, who last season went without a win for the first time in 15 years, was down in 12th spot on his struggling Ducati, over two seconds off the pace.