Japan's Takaaki Nakagami grabbed his maiden MotoGP pole position for Sunday's Teruel Grand Prix, while championship leader Joan Mir could only qualify in 12th place on Saturday.
The 28-year-old Nakagami, who signed a new deal with Honda's satellite team earlier this week, posted a fastest lap of one minute and 46.882 seconds.
He is the first Japanese rider to take pole in the top class since Makoto Tamada 16 years ago in Valencia.
"It's an incredible feeling," he said. "Everything is going pretty well so far.
"I'm very proud but the most important thing is tomorrow (Sunday)."
Italian Franco Morbidelli, who was quickest in practice, qualified second, just 0.063 seconds slower, as Alex Rins rounded out the front row.
Of the four likely world title contenders, Spaniard Maverick Vinales qualified best.
The Yamaha man will start the race on the second row after qualifying fourth, 0.359 seconds slower than Nakagami.
"I'm very happy, honestly. We got the maximum result possible for us today," said Vinales. "What's positive is that our main rivals didn't do so well either...
"For tomorrow I will try to push from the beginning. We know we prepared well for the race, so our expectations are quite high."
Frenchman Fabio Quatararo, who trails Mir by six points at the top of the riders' standings, will also start on the second row, in sixth.
Vinales sits third in the championship, a further six points behind, with Ducati's Andrea Dovizioso 15 points adrift of Mir in fourth.
It was a miserable day for Mir, who has never won a MotoGP race, though, as he qualified last of the riders in second qualifying.
Dovizioso, who has finished second to Marc Marquez in the world championship in each of the last three years, did not even make it to Q2 and will start the race from 14th place on the grid.
There are four races remaining in the coronavirus-truncated season which was blown wide open by Marquez's injury in the opening Spanish Grand Prix.