Outgoing MotoGP champion Marc Marquez snatched the lead from Jorge Lorenzo on a thrilling last lap to win a classic Australian Grand Prix this morning, with championship leader Valentino Rossi finishing fourth.

At the climax of a white-knuckle feast of daredevil racing between the top four place-getters, Marquez coaxed his Honda past Lorenzo before the final turn and roared home to win his first race at Phillip Island and fifth of the season.

Having grabbed and lost the lead time and again over the course of the race, Lorenzo initially cut a dejected figure when crossing for second place.

He quickly cheered, however, having closed the gap on leader Rossi to 11 points ahead of the penultimate race in Malaysia next week.

Double world champion Lorenzo had Andrea Iannone to thank for keeping a rampaging Rossi off the podium, with the unfancied Italian enjoying one of his finest days on a Ducati to take third on a glorious afternoon at the seaside circuit.

Ireland's Eugene Laverty finished 19th for the Aspar MotoGP Team

Lorenzo said in a trackside interview that Marquez had made an "unbelievable last lap".

"I was lucky that Andrea got the podium," he added.

Iannone capitalised on a solid start from second on the grid to sweep past pole-sitter Marquez but held the lead for only moments before Lorenzo swooped at turn eight.

The pair swapped the lead back and forth, and feathers flew on the third lap when a stray seagull ploughed straight into Iannone's helmet, ruffling the Italian who fell back to second.

Marquez soon joined the fray to turn the race into a three-way tussle before Rossi steered his Yamaha brilliantly from seventh on the grid to nip at the leaders' wheels.

Rossi went for broke in the final laps, pushing to second behind Lorenzo with an aggressive thrust past Marquez, but Iannone topped it with an audacious double overtake of both riders.

Lorenzo broke clear from the skirmish to open a gap from Marquez, but the Honda rider burned around the track on his final lap to seal a remarkable victory.

In the Moto2 category, rookie Alex Rins won his second race of the season for Paginas Amarillas HP40 ahead of Speed Up Racing's Sam Lowes and Forward Racing's Lorenzo Baldassarri.

Miguel Oliveira sealed his fourth win of the season in Moto3 after Leopard Racing's championship leader Danny Kent was taken out of the race in a crash during lap 14. Efren Vazquez and Brad Binder completed the podium.