Australian Jack Miller will start the Portuguese Grand Prix, his first since undergoing arm surgery, in fourth place on the grid.
While Yamaha's Fabio Quartararo won pole on Saturday, benefiting after Miller's Ducati teammate Francesco Bagnaia had his record-breaking lap cancelled due to a yellow flag infringement, the sport's returning superstar Marc Marquez was sixth.
Miller, who had to undergo surgery to cure arm pump, will go into Sunday's race with high hopes of doing rather better than his two ninth-placed finishes this season as he came home fourth fastest.
Bagnaia thought he had clinched the top spot by smashing the Algarve International Circuit record with his lap of one minute 38.494 seconds.
However, the Ducati celebrations were ended because of the yellow flags brought out due to a crash for 2020 Portugal poleman Miguel Oliveira in the closing moments of the session.
The incident meant Quartararo, who was fastest throughout the day, secured the 11th pole of his premier-class career with a time of one minute 38.682 seconds, while Bagnaia slipped to 11th.
"It's a pole but doesn't feel like usual," Quartararo said.
"We saw that Bagnaia was extremely fast so I'm more happy about FP3 and FP4.
Returning six-times MotoGP champion Marquez was fastest in Q1 and will start his first race in nine months from the back of the second row in sixth place.
The Repsol Honda rider fractured his upper arm in the season-opening Spanish Grand Prix in July and did not race again all year.
Reigning world champion Joan Mir, who followed Marquez through Q1, finished ninth on his Suzuki, while Oliveira was left 10th after his late crash.
Seven-times premier-class champion Valentino Rossi, who has yet to score a top-10 finish this season, struggled to impress once again as he finished 17th on his Petronas Yamaha.