Bagnaia dominated the hour-long afternoon session with a 1m44.938s, but is currently under investigation from the FIM stewards for potentially blocking Alex Marquez on a flying lap late on.
Tech3 GasGas rookie Pedro Acosta recovered to third after a fast crash at Turn 13 halfway through the session, while Marc Marquez secured direct passage into Q2 for the first time since the Spanish GP.
FP1 pacesetter Maverick Vinales set the initial pace on the factory Aprilia with a 1m46.165s, though this was quickly bested by Marc Marquez with a 1m45.582s.
The Gresini Ducati rider’s lap, set with around 45 minutes remaining, stood as the benchmark until Vinales – fitted with a fresh soft rear tyre – edged clear with a 1m45.245s as the session ticked into its final 20 minutes.
Following his moment with Alex Marquez, in which the Gresini rider was left furious having felt like he was baulked at Turn 12 with 10 minutes to go, Bagnaia lit up the timing screens on his final flying lap.
The factory Ducati rider put in a 1m44.938s with four minutes to go, before heading back to pitlane without attempting any other efforts.
Alex Rins was his closest challenger on the factory Yamaha, 0.273s behind, with Acosta third fastest.
Alex Rins, Yamaha Factory Racing
Photo by: Gold and Goose / Motorsport Images
Miguel Oliveira leaped up to fourth late in the session on his Trackhouse Racing Aprilia, while Marc Marquez completed the top five.
Enea Bastianini was sixth on the second factory team Ducati, with championship leader Jorge Martin in seventh ahead of Alex Marquez, Vinales and his Aprilia team-mate Aleix Espargaro.
A frantic final few minutes saw the top 10 order behind Bagnaia rapidly change, with Fabio Quartararo the biggest loser having slid from third to 11th on his Yamaha.
The 2021 world champion had to abort his final flying lap after suffering a scare on the front end into Turn 10.
He will face Q1 in qualifying on Saturday morning, as will all three factory team KTMs – Brad Binder, Jack Miller and Pol Espargaro.
LCR’s Takaaki Nakagami was fastest of the Hondas in 19th, while Luca Marini on the factory team RC213V was last.