Lima - Qatar's Nasser Al-Attiyah found himself on the brink of a third Dakar Rally victory, and a first for his Gazoo Toyota Racing SA team, after finishing Wednesday's penultimate stage with a lead of 51 minutes.

Al-Attiyah won the ninth stage in the dunes and desert around Pisco, in southern Peru, with Spaniard Nani Roma (Mini) following him home to end the day second overall.

South Africa’s Giniel de Villiers finished the stage in third place in the other South African built Gazoo Hilux, moving up from 10th to eighth overall, albeit still seven hours behind the leader - overall - due to his misfortunes earlier in the race.

France's Sebastien Loeb (Peugeot) was lying third overall at the end of the stage, but remains two hours off the pace.

"Until now everything has gone very well and tomorrow we just need to bring everything (together) in Lima. I'm quite happy," said Al-Attiyah, who won the rally in a Mini in 2015 and Volkswagen in 2011.

"We've followed our strategy from the beginning. We've been leading since stage three and building up the (gap) every day," added the Qatari after his third stage win of this year's event.

Disaster strikes

Wednesday was a day of disaster for 13-times Dakar Rally winner Stephane Peterhansel, who crashed his X-raid Mini 26km into the 312km timed stage.

The Frenchman, nicknamed 'Mr Dakar' for his success on two wheels and four, had been in fourth place at the start of the day's action. Peterhansel's X-Raid Mini co-driver David Castera hurt his back in the accident and was taken to hospital.

Picture: Carlos Jasso / Reuters.

"We came over a dune and landed head-on in the next dune," Peterhansel told motorsport.com. "Everything went so fast that David, who was looking at the road book at that moment, didn't expect the impact."

It was also a horrid day for South Africa’s Shameer Variawa (SVR Red Lined Nissan Navara) who was forced to retire after hitting a rock while driving through thick fog early in the stage.

Price stays ahead, Africans gain ground

In the motorcycle category, Australian Toby Price stayed in front but the KTM rider's lead was on a knife edge with Chilean Pablo Quintanilla only a minute behind on his Husqvarna.

Austrian Matthias Walkner was third, on a KTM, six and a half minutes off the pace.

Botswana’s Ross Branch (KTM) moved up to 13th on the overall log after finishing 15th, while South African Kenny Gilbert (Husqvarna) moved into the overall top 20 after finishing the stage in 24th place, this despite having a frustrating day in which he dropped the bike numerous times in the dunes.

However, misfortune struck the other SA biker, Stuart Gregory of the no-support class, after his KTM’s engine failed, forcing him into retirement.

Just one stage to go

All that remains of this year's Dakar is a fairly short 112km stage, run in reverse order and starting and finishing at the bivouac in Pisco. Following that, crews will drive the final liaison stretch back to Lima for the podium ceremony.

Sources: Reuters, Motorsport Media, Toyota SA & Dakar.com