Dovizioso moved ahead of Marquez on the final lap and clocked a time of 47 minutes, 14.236 seconds at the Twin Ring Motegi circuit to beat the Repsol Honda rider by 0.249 seconds. Ducati rider Danilo Petrucci was third, 10.557 seconds off the pace.

With three races left, Marquez leads Dovizioso by 11 points in the overall season standings.

"I knew that anything could happen," Dovizioso said. "It was so exciting to be in this race, to fight with Marc always is, and it was important for the championship."

Suzuki riders Andrea Iannone and Alex Rins were fourth and fifth, respectively. Jorge Lorenzo was sixth on his Ducati, ahead of Aprilia rider Aleix Espargaro in seventh and pole sitter Johann Zarco on a Yamaha.