The Movistar Yamaha rider was leading most of the race but he was overtaken by Marquez with three laps to go.