France's Johann Zarco has claimed his maiden MotoGP win with a thrilling last-lap steal in another classic edition of the Australian Motorcycle Grand Prix.
His Pramac Racing teammate Jorge Martin led the 27-lap race all the way from pole after being comfortably the quickest rider at Phillip Island all weekend.
But Martin's tyres gradually wore out as his rivals ate away at his near four-second lead with three laps left.
Zarco attempted to protect Martin from the rest of the field, but had no choice but to pass his teammate halfway through the final lap.
The 33-year-old held off challenges from reigning MotoGP champion Francesco Bagnaia and unheralded Italian Fabio Di Giannantonio to secure a famous win.
"It's a good feeling, it's hard to believe," Zarco, who was contesting his 120th MotoGP, said.
"I had a good start and I had to fight hard at the beginning.
"At the end, I really tried to pick up the bike to have the best ride as possible and cross the line in first position.
"After so many races trying to do it, it's really high emotion."
It was Di Giannantonio's first MotoGP podium finish, with the 25-year-old currently without a ride for next season.
Martin will be heartbroken after arriving in Australia second in the overall championship standings, 18 points behind Bagnaia.
He appeared set to cut that gap to six points when he led the race, but instead finds himself 25 points adrift after crossing the line fifth.
During qualifying, Martin smashed the Phillip Island track record, clocking a scorching lap of 1.27.246, and was clearly the one to beat.
Martin also claimed pole at Phillip Island last year, when he ended up finishing seventh.
Australian hero Jack Miller got up to third during a scorching first lap but quickly was passed and soon dropped to sixth.
Miller could not make up enough ground and finished seventh.
Alex Rins secured a thrilling win at Phillip Island last year, but he was forced to pull out of the event due to lingering leg pain from a crash earlier in the season.
Rins raced in Indonesia last Sunday, finishing ninth, but his ongoing issues worsened after taking part in practice at Phillip Island on Friday.
The 27-year-old has headed to Melbourne for scans to determine where the pain is coming from.
The main race was moved forward by 23 hours from Sunday after being swapped with the sprint event.
Organisers confirmed the change late on Friday as they prepared for wet and windy weather on Sunday that could severely impact track conditions.
The sprint race will still go ahead on Sunday, weather permitting.
AUSTRALIAN MOTORCYCLE GRAND PRIX RESULTS
1. Johann Zarco (Ducati)
2. Francesco Bagnaia (Ducati)
3. Fabio Di Giannantonio (Ducati)
4. Brad Binder (KTM)
5. Jorge Martin (Ducati)
Also:
7. Jack Miller (KTM)