World champion Marc Marquez secured his 11th victory of the season at the Australian MotoGP after disaster struck fellow Spaniard Maverick Vinales, who crashed on the last lap.
The Monster Energy Yamaha rider had dominated all weekend at Phillip Island and was leading for much of the race until Repsol Honda's Marquez darted past in the dying stages.
In desperate bid to retake the lead, Vinales pushed too hard and skidded out to hand his gifted rival, who clinched his sixth MotoGP world title in Thailand this month, the fifth win in a row.
Britain's Cal Crutchlow, who suffered career-threatening injuries at Phillip Island last year, came second on his LCR-Honda with Australian Jack Miller third on a Ducati.
Italian veteran Valentino Rossi, racing in an amazing 400th Grand Prix, was eighth.
"It was an incredible, incredible victory because today we were not the fastest on the racetrack," said Marquez, who became Honda's most successful ever premier class rider with his 55th win surpassing Australian great Mick Doohan.
"Maverick was fastest but I was waiting for him... and I did a strong move to pass, it was the only chance for me.
"The whole weekend has been crazy," he added after qualifying was called off on Saturday due to strong winds and instead run on Sunday morning.
Asked about becoming Honda's most successful ever rider, he said: "They are the biggest manufacturer in the world, so I'm happy and just enjoying the dream."
- Very special -
It was a crushing loss for Vinales, who won in Australia last year and started from pole, having reigned supreme through practice and qualifying.
He had a terrible start, slipping to sixth as Rossi powered to the lead before and disaster for exciting French rookie Fabio Quartararo in an incident-packed first lap.
Quartararo, who was second to Marquez in Japan last weekend, and Danilo Petrucci collided, crashing out at turn two.
It was a sobering end for the 20-year-old, who was second on the grid after having to go through preliminary qualifying (Q1) for the first time following a nasty spill in Friday practice.
By lap four Crutchlow had moved into the lead, but Vinales and Marquez were starting to apply pressure and by lap 10 Vinales was in front with his rival stalking him.
They began to put the hammer down and pull clear of the field as it turned into a two-horse race, leaving the rest in a dog fight for third.
Marquez was riding on the limit, giving everything he had to stay in touch and finally edged past Vinales at the start of the final lap before the late drama as drops of rain started to fall.
Crutchlow was ecstatic about making the podium after the horrors of last year when he fractured his ankle and had to undergo surgery.
"Crashes don't normally phase me but that one has haunted me all year," he said after his best result of 2019.
"I was not happy coming to this Grand Prix thinking about it, about what could happen, so to have a podium back here is very, very special."