When the FIM MotoGP World Championship returned to Spielberg in Austria and the Red Bull Ring last year after an absence of 19 years, the fast improving factory Ducati team dominated proceedings with their two bikes finishing 1-2, nearly three and a half seconds ahead of the rest of the field.
Last year's victor Andrea Iannone will start 10th on the grid after finishing nearly a second off the pace on his Suzuki.
Dovizioso made it three-wide for the lead on the following straight and was briefly ahead at Turn 4, but subsequently ran wide and handed first back to Marquez.
Marquez retook the spot shortly thereafter at Turn 7, but again couldn't shake Dovizioso - who slipstreamed past on the main straight with seven laps to go.
World championship leader Marquez had started on pole but Italian Dovizioso got the better of an incredible battle where the lead changed hands several times, including twice on the final corner.
Scott Redding was 10th, but will have to take part in the Q1 qualifying session as Dovizioso's fastest lap from FP2 was enough to put him through to Q2 despite finishing FP3 in 16th and the best part of a second off Marquez's time.
Six-time MotoGP champion Valentino Rossi on Yamaha posted the seventh fastest time, while last year's victor, Suzuki rider Andrea Iannone, was 10th.
The Marquez-Dovizioso duel allowed Pedrosa to close right up to the pair, but he was unable to keep their pace and finished 2.485 seconds off.
Alvaro Bautista, Loris Baz and KTM test rider Mika Kallio rounded out the top 10.
Pramac Ducati's Danilo Petrucci and Tech 3 Yamaha's Jonas Folger were also among the retirements, calling it a day in the pits, while Marc VDS Honda's Jack Miller crashed out at Turn 9.