With only 120km of timed special stage remaining around Cordoba, Sainz's second Dakar victory looks assured in what will be a fitting farewell for Peugeot's works team in their final appearance.
The Spaniard took no risks on Friday's marathon 929km stage, which was dominated by al-Attiyah, who took his fourth stage win of this year's rally. Sainz finished 19 minutes and 37 seconds behind the Qatari.
Peterhansel, a 13 times Dakar winner on bikes and cars, had started the day second overall but clipped a tree with his front left wheel on a bend that was hidden by a bump.
The impact broke a steering rod, with the support team carrying out repairs once he was out of the timed zone, and also left the Frenchman with a sprained thumb.
The delay meant he lost about an hour and fell behind al-Attiyah in the standings.
Toyota's Dutch driver Bernhard ten Brinke retired with mechanical problems.
In the motorcycle category, Austrian KTM rider Matthias Walkner ended the day with a 22 minute lead over Argentina's Kevin Benavides on a Honda.
Australian Toby Price, the 2016 winner, took his second successive stage win.
(Reporting by Alan Baldwin in London, editing by Greg Stutchbury)
Share
