SANTIAGO, Chile (AP) — Nasser Al-Attiyah cut Stephane Peterhansel's lead to virtually nothing in the Dakar Rally with a sixth-stage win that was spoiled by the withdrawal of his teammate Carlos Sainz on Thursday.

Al-Attiyah, the 2011 champion from Qatar who had to withdraw last year, won his third stage, a 438-kilometer timed special that was cut in two to somewhat ease the rugged challenge of racing for four hours into the Atacama Desert.

Meanwhile, Francesco Lopez also won his third stage of the motorbike race, and his fifth ever in his native Chile, to rise to a close fourth behind the leading French trio of Olivier Pain, Cyril Despres and David Casteu.

Al-Attiyah's buggy led the first Chilean stage all the way from Arica on the coast inland to Calama, beating defending champion Peterhansel in his Mini by more than eight minutes to cut the Frenchman's overall lead to an insignificant 1:18.

"I'm quite happy with everything," Al-Attiyah said. "We just try to keep going like this and we try to keep close to Peter because maybe tomorrow the stage might not be for us, but OK, if we lose, we lose just a few minutes."

Theirs has become a two-car race as rivals have struggled.

Giniel de Villiers, third overall at 43 minutes behind, got stuck in his Toyota for 10 minutes after 70 kilometers, the same area where Nani Roma's Mini was bogged down for 30 minutes. Roma dropped to seventh and 90 minutes down. The only other driver within an hour of Peterhansel was Russian teammate Leonid Novitskiy at 45 minutes.

"We had our first mishap today in the dunes around Iquique," Peterhansel said. "The sand was very soft. Nani took advantage to overtake us, but several kilometers further on, we saw him stuck in a hollow, which just goes to show how complicated it is."

Sainz, who won the opening stage on Saturday, withdrew for the second time since he won the race in 2010. Electrical problems which began to dog his buggy from Tuesday finally overwhelmed the engine while he was on teammate Al-Attiyah's tail a third of the way through the stage.

In the bikes, Lopez took advantage of technical problems by Paulo Goncalves, who led for three-quarters of the stage and fell to 67th, more than an hour back.

Lopez beat home Ruben Faria of Portugal by three minutes and defending champ Despres by four.

Pain was ninth in, only eight minutes back, to keep the overall lead for a third straight day, 2:22 ahead of Despres. Casteu was 4:48 back in third, and Lopez six minutes behind in fourth.

On Friday, the rally caravan crosses the Andes into Argentina for a high-altitude seventh stage.