SEPANG, Malaysia (AP) — Andrea Dovizioso won Sunday's Malaysian MotoGP to keep alive his slim chance of winning his first world championship and ensuring this year's title race will come down to the last round of the year.

The Italian won his sixth race this season to narrow the gap to championship leader Marc Marquez to 21 points with only the Valencia Grand Prix on November 12 to come.

After crashing heavily in practice, Marquez took no risks on a wet Sepang circuit, crossing the line fourth to remain in a commanding position to clinch his fourth world title in five seasons.

The only way the 24-year-old Spaniard can lose the championship is if Dovizioso wins in Valencia and Marquez finishes outside the top 11 on his Honda.

Dovizioso's Ducati team mate Dani Pedrosa finished second on Sunday after starting from pole posiiton and leading until the last four laps while France's Johann Zarco was third for just his second podium finish of the season.

Italy's Franco Morbidelli wrapped up his first Moto2 title when his lone remaining challenger for the championship, Switzerland's Thomas Luthi, was ruled out of Sunday's race after breaking his ankle in qualifying.

With an unassailable lead and light rain falling on the track, Morbidelli cruised across the line in third place, behind Portugal's Miguel Oliveira_who won his first race in Australia last week, and South Africa's Brad Binder.

Spain's Joan Mir, who clinched the Moto3 crown in Australia, won his 10th race of the season in Malaysia.