The Italian Bagnaia, winner of the last four races, set a time of 1:46.069 and took pole with 0.090 seconds from Ducati works teammate Jack Miller and Enea Bastianini of Gresini Racing, who completed the front row.
Aprilia’s Espargaro finished fourth ahead of Pramac Ducati rider Johann Zarco, while championship leader Quartararo took sixth on his final lap.
Honda rider Marc Marquez, six-time MotoGP champion, finished 13th on his return to racing after recovering from surgery and missing the final six rounds of the championship.
Suzuki rider Joan Mir withdrew from the Aragon GP weekend after the third practice session earlier on Saturday due to an ankle injury. The 2020 World Champion will also be present at next weekend’s Japanese GP in Motegi.