Bagnaia and Martin are split by just 13 points ahead of this afternoon’s sprint contest at the Sepang International Circuit, which set up a critical qualifying on Saturday morning.
Pramac’s Martin looked set to add a third-straight pole to his tally of four for the season when he posted a lap record 1m57.549s on his first stint in Q2.
But Bagnaia responded emphatically with a 1m57.491s to snatch his first pole since Barcelona by just 0.058 seconds.
A crash for Martin left him second ahead of Ducati’s Enea Bastianini, who came through Q1 to secure his first front row start since last year’s Malaysian GP.
Ducati controlled the 15-minute Q2 segment in qualifying, with Alex Marquez – who was fastest on Friday – setting the initial pace on his year-old Gresini Ducati with a 1m57.924s.
This was quickly beaten by Luca Marini on the VR46 2022-spec Ducati, with a 1m57.787s, before Martin lit up the timing screens on his latest-spec Pramac Desmosedici.
Martin’s 1m57.549s put him over two tenths under his previous lap record from his pole time in 2022.
Having progressed through Q1, Bastianini was the first rider to threaten Martin’s lap, the four-time grand prix winner – who is rumoured to be getting replaced by Martin at the factory squad next year – getting to within 0.041s of the pole time.
On the first flying lap of his second run in the closing stages of Q2, Bagnaia had to abort an effort due to Marini crashing in front of him at Turn 9.
His final flier started off well, and he was given a boost to his pole chances when Martin crashed at Turn 4 on his last lap.
Bagnaia was almost a tenth and a half up on Martin through sector three and held on to take his seventh pole of the season.
Martin and Bastianini completed the front row, with Alex Marquez heading row two from VR46 duo Marini and Marco Bezzecchi.
Brad Binder was seventh on the leading factory KTM ahead of Yamaha’s Fabio Quartararo and Aprilia’s Maverick Vinales.
Jack Miller (KTM) will start 10th, with Fabio Di Giannantonio – who joined Bastianini in advancing from Q1 – 11th after crashing his Gresini Ducati at the last corner. Pramac’s Johann Zarco was 12th.
Aprilia’s Aleix Espargaro’s Malaysia weekend failed to improve, after he crashed four times on Friday as he tested a front fork from Ohlins he didn’t feel comfortable on.
Photo by: Gold and Goose / Motorsport Images
Fabio Di Giannantonio, Gresini Racing
He could do no more than 13th in qualifying at Sepang, missing a place in Q2 by 0.158s ahead of Tech3 GasGas rider Augusto Fernandez.
Fernandez was lucky not to be taken out by Marc Marquez when the Honda rider crashed trying to overtake the Tech3 rider on the inside of Turn 7 late on in Q1.
Eight-time world champion Marquez had been on course for a lap to challenge the top two spots when he lost the front of his RC213V over a vicious bump in Turn 7.
That concluded a scrappy session for Marquez, who was repeatedly caught up in some Gamesmanship with Yamaha’s Franco Morbidelli, as he cruised looking for the Italian’s tow.
His crash left him down in 20th, while Morbidelli was 15th ahead of the leading Honda of Joan Mir in 16th.
Pol Espargaro will start 17th on the second Tech3 GasGas from RNF Aprilia duo Raul Fernandez and Miguel Oliveira.
Alex Rins’ LCR injury stand-in Iker Lecuona lines up last of the 23 riders.
MotoGP Malaysian GP - Q2 results:
|1||F. Bagnaia Ducati Team||1||Ducati||7||
|2||J. Martin Pramac Racing||89||Ducati||6||
|3||E. Bastianini Ducati Team||23||Ducati||4||
|4||A. Marquez Gresini Racing||73||Ducati||7||
|5||L. Marini Team VR46||10||Ducati||4||
|6||M. Bezzecchi Team VR46||72||Ducati||7||
|7||B. Binder Red Bull KTM Factory Racing||33||KTM||7||
|8||F. Quartararo Yamaha Factory Racing||20||Yamaha||7||
|9||M. Viñales Aprilia Racing Team||12||Aprilia||7||
|10||J. Miller Red Bull KTM Factory Racing||43||KTM||7||
|11||F. Di Giannantonio Gresini Racing||49||Ducati||5||
|12||J. Zarco Pramac Racing||5||Ducati||6||
|View full results|
MotoGP Malaysian GP - Q1 results:
|1||F. Di Giannantonio Gresini Racing||49||Ducati||6||
|2||E. Bastianini Ducati Team||23||Ducati||6||
|3||A. Espargaro Aprilia Racing Team||41||Aprilia||6||
|4||A. Fernandez Tech 3||37||KTM||6||
|5||F. Morbidelli Yamaha Factory Racing||21||Yamaha||6||
|6||J. Mir Repsol Honda Team||36||Honda||7||
|7||P. Espargaro Tech 3||44||KTM||6||
|8||R. Fernández RNF Racing||25||Aprilia||7||
|9||M. Oliveira RNF Racing||88||Aprilia||7||
|10||M. Marquez Repsol Honda Team||93||Honda||5||
|11||T. Nakagami Team LCR||30||Honda||7||
|12||A. Bautista Ducati Team||19||Ducati||5||
|13||I. Lecuona Team LCR||27||Honda||7||
|View full results|
Ducati wants to "imitate" Red Bull's 2023 F1 domination in MotoGP
The Marquez problem Yamaha is about to face with its MotoGP superstar
Pol Espargaro feels like he has reached “the beginning of the end” in MotoGP
Acosta: “Stupid” to consider me a title contender as a MotoGP rookie
Why Marquez's MotoGP rivals have reason to worry about his Ducati debut
Bastianini: 2024 Ducati MotoGP bike “better from the start” in Valencia test
Rins: Yamaha MotoGP bike “very different” to the Suzuki
The factors that show Marquez’s Ducati MotoGP debut was a genuine success