Sepang - Andrea Dovizioso won his first MotoGP race in seven years on Sunday, pulling away from legend Valentino Rossi late in the Malaysia Grand Prix to take the checkered flag for Ducati.
Starting from pole position, the Italian fell back early as he and a number of riders struggled on the rain-soaked Sepang International Circuit.
But Dovizioso steadily reeled in his compatriot Rossi, taking the lead back with six laps to go and quickly opening up a gap as Rossi was slowed by tyre issues.
Dovizioso, 30, finished 3.115 seconds ahead of Rossi for his maiden win of the season and first since 2009.
Rossi, however, clinched second place in the 2016 world championship over his Yamaha team-mate and rival Jorge Lorenzo of Spain.
Lorenzo, who will switch to Ducati next year, finished third on Sunday.
Honda's Marc Marquez had already wrapped up the world championship two weeks earlier in Japan.
Dovizioso called Sunday's win the biggest of his career.
"It's really nice to come to this moment. In these conditions I struggled a lot in the race and had some problems, but I really wanted it," he said.
The race began after a short delay because of a tropical downpour dousing the track.
Riders this week complained that the track, newly re-paved this year, was draining unevenly after rain, creating alternating wet and dry patches.
Much of the race was a gripping duel between Rossi and Dovizioso's Ducati teammate Andrea Iannone, who was returning to the track for the first time since suffering a vertebrae fracture in a crash in early September.
The lead repeatedly changed hands between Rossi and Iannone over the first 10 laps as they aggressively dived under each other with inches to spare on Sepang's tight curves.
But Iannone cracked, crashing out with seven laps left. One of three riders to crash, Iannone was uninjured but did not return.
Dovizioso pounced, overtaking Rossi and quickly stretching a sizable lead as Rossi slowed when the tyres his team chose began to prove unsuitable on the increasingly dry track.
"I was optimistic for the victory," said Rossi, 37, nine-time world champion.
"But with less water I started to suffer very much with the tyres, especially the front."
With one eye on second place in the world championship, Rossi said he didn't want to crash out and "throw away 20 points."
"It's a shame because we would have liked to win but it's good to get second place in the championship."
"When you have a chance to close these things, you have to try."
Rossi has had great success at Sepang in the past but has not won on the track since 2010, which also was the last year he won the world title.
Besides Iannone, British rider Cal Crutchlow crashed, as did Marquez. Marquez got back on the track and finished 11th.
Marquez slid off the track the previous weekend in Australia when he was in control of the race, which Crutchlow eventually won.
The crash-happy tone on the slick track was set earlier in the day during the Moto3 category, a veritable demolition derby marked a series of collisions and wipe-outs.
France's Johann Zarco won in Moto2 to become the first man to repeat since the championship was introduced in 2010.
He became the first French rider to win more than one championship in Grand Prix Racing, according to MotoGP.
Results from the Malaysia Motorcycle Grand Prix on Sunday:
1. Andrea Dovizioso (ITA/Ducati) 42min 27.333secs, 2. Valentino Rossi
(ITA/Yamaha) at 3.115, 3. Jorge Lorenzo (ESP/Yamaha) 11.924, 4. Hector
Barbera (ESP/Ducati) 19.916, 5. Loris Baz (FRA/Ducati) 21.353, 6.
Maverick Vinales (ESP/Suzuki) 22.932, 7. Alvaro Bautista (ESP/Aprilia)
25.829, 8. Jack Miller (AUS/Honda) 32.746, 9. Pol Espargaro (ESP/Yamaha)
33.704, 10. Danilo Petrucci (ITA/Ducati) 34.280
1. Johann Zarco (FRA/Kalex) 45min 51.036secs, 2. Franco Morbidelli
(ITA/Kalex) at 3.256, 3. Jonas Folger (GER/Kalex) 3.689, 4. Lorenzo
Baldassarri (ITA/Kalex) 21.428 5. Hafizh Syahrin (MAS/Kalex) 24.70, 6.
Thomas Luthi (SUI/Kalex) 26.184, 7. Alex Marquez (ESP/Kalex) 28.177, 8.
Xavi Vierge (ESP/Tech3) 28.855, 9. Luca Marini (ITA/Kalex) 29.247, 10.
Isaac Vinales (ESP/Tech3) 29.969
1. Francesco Bagnaia (ITA/Mahindra) 29min 29.351secs, 2. Jakub
Kornfeil (CZE/Honda) at 7.108, 3. Bo Bendsneyder (NED/KTM) 7.253, 4.
Fabio Quartararo (FRA/KTM) 8.469, 5. Andrea Locatelli (ITA/KTM) 12.414,
6. Marcos Ramirez (ESP/Mahindra) 12.706, 7. Gabriel Rodrigo (ARG/KTM)
13.387, 8. Khairul Idham Pawi (MAS/Honda) 13.506, 9. Livio Loi
(BEL/Honda) 14.445, 10. Darryn Binder (RSA/Mahindra) 38.777