Two-time winner Carlos Sainz became the third new leader of the Dakar Rally after winning the third stage ahead of defending champion Nasser Al-Attiyah on Tuesday.

Sainz and Al-Attiyah vied for the lead throughout the 427-kilometer loop out from and back to Neom near Saudi Arabia's northern border with Jordan.

Sainz prevailed after nearly four hours, beating Al-Attiyah by 3 1/2 minutes on a course with a fast first half and mountainous second. Jakub Przygonski, who endured six hours of mechanical problems on the first stage, was third. Former Formula One driver Fernando Alonso was fifth.

Pablo Quintanilla of Chile rides his Husqvarna motorbike during stage three of the Dakar Rally in Neom, Saudi Arabia, Tuesday, Jan. 7, 2020. (AP PhotoBernat Armangue)

Pablo Quintanilla of Chile rides his Husqvarna motorbike during stage three of the Dakar Rally in Neom, Saudi Arabia, Tuesday, Jan. 7, 2020. (AP PhotoBernat Armangue)

Overnight leader Orlando Terranova was nearly 13 minutes behind Sainz on the stage and dropped to third overall, eight minutes back.

Sainz led Al-Attiyah by nearly five minutes overall.

The motorbike standings had to be modified because of GPS problems. Organizers used the times after 389 kilometers.

Joan Barreda of Spain rides his Honda motorbike during stage three of the Dakar Rally in Neom, Saudi Arabia, Tuesday, Jan. 7, 2020. (AP PhotoBernat Armangue)

Joan Barreda of Spain rides his Honda motorbike during stage three of the Dakar Rally in Neom, Saudi Arabia, Tuesday, Jan. 7, 2020. (AP PhotoBernat Armangue)

That reduced Ricky Brabec's commanding victory from 10 minutes to six over Honda teammates Jose Ignacio Cornejo and Kevin Benavides.

The change also benefited defending champion Toby Price and Xavier de Soultrait. They were originally 35 and 48 minutes off the pace, but that was reduced to 8 1/2 and nearly 14 and they stayed in the top eight.

Brabec took over the lead in the general standings, nearly five minutes ahead of Benavides. Matthias Walkner was third. Price was less than 12 minutes back.

Kevin Benavides of Argentina rides his Honda motorbike during stage three of the Dakar Rally in Neom, Saudi Arabia, Tuesday, Jan. 7, 2020. (AP PhotoBernat Armangue)

Kevin Benavides of Argentina rides his Honda motorbike during stage three of the Dakar Rally in Neom, Saudi Arabia, Tuesday, Jan. 7, 2020. (AP PhotoBernat Armangue)

Ross Branch, the winner of stage two, slammed his back wheel into a rock while taking a corner too wide after 88 kilometers and fell and hurt his shoulder.

He finished, though, unlike others who crashed and had to withdraw, including Guillaume Cholet, Adrien van Beveren, Olaf Harmsen, and Martien Jimmink. De Soultrait also fell but finished with a tourniquet on his bleeding right arm.

The rally finishes on Jan. 17.

More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports