Andrea Dovizioso showed Ducati what they will be missing next year by winning a pulsating Austrian Grand Prix after a horror crash brought the red flags out on Sunday.

It was announced on Saturday that Dovizioso will move on at the end of the MotoGP season after eight years with Ducati and there should be no shortage of offers to sign him after his magnificent victory at the Red Bull Ring.

The Italian moved into the lead when Alex Rins spun off soon after taking the lead 10 laps from the end of an action-packed race and went on to secure a first win of the season – and his third in the last four years at this track.

Joan Mir passed Jack Miller on the final corner to take second spot at the end of a dramatic race that was stopped on lap nine following a sickening smash.

Franco Morbidelli and Johann Zarco incredibly avoided serious injury after they tangled at Turn 3 and Valentino Rossi was almost struck by one of their bikes as it flashed across the track at high speed.

Rossi's team-mate Maverick Vinales also had a near miss when the two stray bikes hurtled across the circuit in an incident that could have been so much worse.

The legendary Rossi showed his incredible character to get back on his Yamaha and finished fifth behind Brad Binder after the race restarted with 20 laps to go.

Championship leader Fabio Quartararo could only finish eighth, so Dovizioso is now just 11 points behind him in second place, while Vinales was back in 10th.

Miller earlier surged into the lead at the start as Vinales slipped back from pole and the Australian also got off to a flyer from the restart to hit the front, but he had to settle for the third step of the podium.

Pol Espargaro led before the restart but crashed out as Ducati won the race for a fifth year in a row.