Valentino Rossi rolled back the years to win his sixth premier class Australian Grand Prix after world champion Marc Marquez's cruise to a pole-to-flag victory was ended suddenly by a crash on lap 18.
With a second successive MotoGP world title secured in Japan last week, 21-year-old Honda rider Marquez looked destined to match Mick Doohan's record of 12 race wins in a single season when he led by four seconds.
Ten laps from the end, though, his front end was just snatched away from under him and he slithered along the asphalt and onto the trackside grass.
Seven-time world champion Rossi was racing in his 250th premier class grand prix and had won a ding-dong battle with teammate Jorge Lorenzo for what he thought would be second place only to claim his first win in Australia since 2005.
"It is one of the best," said the 35-year-old Italian Yamaha rider. "To come from third place, to win on the island after 10 years. I'm very happy."
Spaniard Lorenzo was second while Briton Bradley Smith was third in a Yamaha sweep, the Oxford rider securing his first podium when compatriot Cal Crutchlow fell off his Ducati riding in second place on the last lap.
1. Marc Marquez (Spain) Honda 312 (champion)
2. Valentino Rossi (Italy) Yamaha 255
3. Jorge Lorenzo (Spain) Yamaha 247
4. Dani Pedrosa (Spain) Honda 230
5. Andrea Dovizioso (Italy) Ducati 166