Al-Attiyah finished the 369-kilometer (229-mile) stage between San Juan and Cordoba, Argentina, in 2 hours, 53 minutes. Argentina's Lucio Alvarez was 11:16 behind in second place in his privately-run Hilux, with Toyota's Giniel De Villiers of South Africa taking third spot, 13:06 behind the leader.
The 13th stage of the Dakar was full of dramatic turns.
The Dutchman Bernhard ten Brinke led the second part over a series of sand dunes with difficult areas of fine, soft sand known as "fesh-fesh." But he was later forced to drop out of the Dakar after his Toyota suffered mechanical problems.
Meanwhile, Peterhansel's crash ruled out any chance of a comeback for another victory for the man who has won more Dakars than anyone. The accident also caused the Frenchman to lose second spot in the overall standings to Al-Attiyah from Qatar.
Sainz, who won the rally in 2010, failed to finish the last five Dakars because of mechanical problems or crashes. This time around, he has avoided unnecessary risks in the final stages in what now seems like a certain path to victory. His overall lead is 46:18, with Al-Attiyah in second place. De Villiers is third, 1:20:00 off the pace.
"I tried to play it safe, even if there were plenty of tricky parts," Sainz said. "Since the start, there has been a lot of drama in this race and it's not over until we've crossed the finishing line. It's not a crazy Dakar, but it's very difficult. I hope everything will go OK tomorrow."
In the motorbike race, Australian rider Toby Price of the KTM team won the stage. He was followed by Argentine Kevin Benavides of Honda and Frenchman Antoine Nemeo, whose strong performance allowed him to gain a place in the general standings, climbing to fourth spot above his KTM teammate Gerard Farres of Spain.
Overall, Austria's Matthias Walkner leads Benavides by 22:31 and Price by 27:45.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.