Andrea Dovizioso passed Marc Marquez on the final lap to win a thrilling Japanese MotoGP and reduce the championship deficit to his title rival.
Italian Dovizioso, who started from ninth on the grid, headed into the closing moments of the rain-soaked race at Motegi in second place.
But the Ducati rider made his move on Honda's Marquez with just four corners remaining to clinch a brilliant victory.
Marquez, the three-time world champion, nearly re-passed Dovizioso at the final turn, but the Italian pulled away on the straight to cross the line with a winning margin of just 0.249 seconds.
Dovizioso's fifth victory of the campaign moves him to just 11 points behind Marquez with three rounds remaining.
Seven-time champion Valentino Rossi, who is continuing his recovery from a double leg fracture, spun out in the opening phase of the race.
MotoGP: 1 Andrea Dovizioso (Ita) Ducati 47mins 14.236secs, 2 Marc Marquez (Spa) Honda 47:14.485, 3 Danilo Petrucci (Ita) Ducati 47:24.793, 4 Andrea Iannone (Ita) Suzuki 47:33.081, 5 Alex Rins (Spa) Suzuki 47:37.218, 6 Jorge Lorenzo (Spa) Ducati 47:38.700, 7 Aleix Espargaro (Spa) Aprilia 47:42.246, 8 Johann Zarco (Fra) Yamaha 47:43.711, 9 Maverick Vinales (Spa) Yamaha 47:50.811, 10 Loris Baz (Fra) Ducati 48:02.742.
Leading Riders: 1 Marc Marquez (Spa) Honda 244pts, 2 Andrea Dovizioso (Ita) Ducati 233, 3 Maverick Vinales (Spa) Yamaha 203, 4 Dani Pedrosa (Spa) Honda 170, 5 Valentino Rossi (Ita) Yamaha 168, 6 Johann Zarco (Fra) Yamaha 125, 7 Jorge Lorenzo (Spa) Ducati 116, 8 Danilo Petrucci (Ita) Ducati 111, 9 Cal Crutchlow (Gbr) Honda 92, 10 Jonas Folger (Ger) Yamaha 84 Manufacturer: 1 Honda 294pts, 2 Ducati 273, 3 Yamaha 265, 4 Suzuki 77, 5 Aprilia 64, 6 KTM 51
Manufacturer: 1 Honda 370pts, 2 KTM 209, 3 Mahindra 36, 4 Peugeot 22