Valentino Rossi edged out Danilo Petrucci to take victory in a thrilling Dutch MotoGP as Maverick Vinales crashed out to concede the championship lead to Andrea Dovizioso.
Vinales came off his bike before the halfway stage of Sunday's race and Dovizioso looked capable of taking full advantage with his third successive victory as he charged into contention late on.
However, it was Rossi who ultimately prevailed, the veteran holding off a determined challenge from Petrucci to earn his eighth MotoGP triumph at Assen and 10th at the venue across all classes.
Rossi's first victory in 2017 lifts him to third in the championship, with the top four now separated by just 11 points.
After qualifying well down the field, Vinales initially made positive progress as he climbed to fifth, only to then lose control of his bike and slide out.
Dovizioso was the fastest man on the track as he hunted down the leading quartet - pole-sitter Johann Zarco, Marc Marquez, Rossi and Petrucci - to move into contention.
Yet although Dovizioso briefly moved up to second, it was fellow Italians Rossi and Petrucci who pulled clear over the closing laps, the latter seemingly unimpressed at being hampered by back-markers as he was narrowly beaten.
Zarco dropped out of the running and opted to pit for wet tyres as rain started to fall, while Marquez just about got the better of a charging Cal Crutchlow and Dovizioso to complete the podium.
POLE-SITTER ZARCO'S LATE GAMBLE FAILS
When rain started to fall with a handful of laps remaining, pole-sitter Zarco may have felt he had nothing to lose given he had already dropped down to fourth.
He duly pitted for a new bike, but the rain never became heavy enough to inconvenience those who stayed out on track.
Zarco therefore had to settle for 14th, a disappointing end to a weekend that had appeared full of promise when he qualified at the front of the field.
IN THE POINTS
1. Valentino Rossi (Movistar Yamaha)
2. Danilo Petrucci (OCTO Pramac) +0.063secs
3. Marc Marquez (Repsol Honda) +5.201s
4. Cal Crutchlow (LCR Honda) +5.243s
5. Andrea Dovizioso (Ducati) +5.327s
6. Jack Miller (Marc VDS) +23.390s
7. Karel Abraham (Pull&Bear Aspar Team) +36.982s
8. Loris Baz (Reale Avintia Racing) +37.058s
9. Andrea Iannone (Team Suzuki Ecstar) +37.166s
10. Aleix Espargaro (Aprilia Racing Team Gresini) +1.01.929s
11. Pol Espargaro (Red Bull KTM Factory Racing) +1.09.384s
12. Tito Rabat (Marc VDS) +1.10.121s
13. Dani Pedrosa (Repsol Honda) +1.10.344s
14. Johann Zarco (Monster Yamaha Tech 3) +1.35.655s
15. Jorge Lorenzo (Ducati) + 1 lap
1. Andrea Dovizioso - 115 points
2. Maverick Vinales - 111
3. Valentino Rossi - 108
4. Marc Marquez - 104
5. Dani Pedrosa - 87
The Sachsenring hosts the German MotoGP next weekend, before a five-week break in the season.