The duo stayed first and second until the mid-session lull and both returned to the track relatively early, doing a fast lap already with six minutes still on the clock.
However Lorenzo did not improve and then pitted, as Marquez’s run ended with a fast crash at the Turn 15 left-hander.
Marquez then sprinted back to the pits and mounted his second bike with four minutes left of the session to run, but the Honda rider could not improve his previous time.
Lorenzo on the other hand managed to lower his benchmark by a further tenth as the chequered flag fell, topping his third qualifying session on a Ducati with a best time of 1m31.629s.
Jack Miller moved into second just as Marquez crashed and the Pramac Ducati rider kept the position, starting from the front row for the second time this year after his pole in Argentina.
The front row will be completed by Yamaha’s Maverick Vinales, who narrowly edged out Andrea Dovizioso on his last lap.
Marquez ended up fifth ahead of Cal Crutchlow (LCR Honda), who also had a crash, and the second factory Yamaha of home hero Valentino Rossi.
Danilo Petrucci (Pramac) was the fourth Ducati in the top eight, with Johann Zarco (Tech 3 Yamaha) and Alex Rins (Suzuki) taking ninth and 10th ahead of the two riders to advance from Q1, Dani Pedrosa and Franco Morbidelli.
Morbidelli chose to do one run to save tyres and then failed to set a representative laptime as he crashed at Turn 4.
Q1: Iannone misses the cut
Honda riders Pedrosa and Morbidelli made it through Q1, as Suzuki’s Andrea Iannone missed out on Q2 for the first time since MotoGP’s 2017 visit to Misano.
Pedrosa led for most of the first part of qualifying, leading Iannone by two tenths during the mid-session lull, with a 1m32.389s – which proved enough to top the session.
Iannone however was demoted by Morbidelli, who set a time just 0.06s behind Pedrosa, Valentino Rossi’s protege making it to Q2 for the second time after doing so for the first time at Mugello.
Iannone will start Sunday’s race 13th ahead of Ducati wildcard Michele Pirro, whose chances of making it to Q2 were over after a late crash at Turn 10.
World Superbike-bound Alvaro Bautista (Nieto Ducati) will line up 15th on the grid ahead of Aleix Espargaro (Aprilia) and Bradley Smith (KTM).
Honda wildcard Stefan Bradl was 18th as Pol Espargaro, returning from injury, qualified 20th on the second KTM.
Xavier Simeon, riding the injured Tito Rabat’s Ducati GP17, had a crash at Turn 16 and will start 22nd, two places ahead of the also falling Karel Abraham.
MotoGP debutant Christophe Ponsson, riding Simeon’s Avintia Ducati GP16, rounded out the order, his 1m37.180s nearly five seconds off the pace.