Qatar driver Al-Attiyah leads Dakar Rally by 49 minutes at halfway point
Loeb started the sixth stage, a loop course east of Riyadh, 35 minutes behind in second overall but lost his bearings with Henk Lategan - the stage five winner - about a third of the way into the 348-kilometre special.
After two-thirds of the stage, they were 25 minutes behind Al-Attiyah, who was leading the stage back to the Saudi capital. But a desperately fast finish by Loeb made up 10 minutes and he lost 15 and a half minutes in the end to Al-Attiyah.
Loeb also lost second place overall to local driver Yazeed Al Rajhi, who was third on the stage.
Only three minutes separate Al Rajhi, Loeb and fourth-placed Giniel de Villiers, the former champion who had a five-hour time penalty rescinded after a review on Friday. He hit a motorbike after jumping over a dune on Wednesday, but the rider fell off only seconds beforehand and de Villiers managed to avoid the rider but not the bike. Officials agreed it was an unavoidable accident.
But Al-Attiyah remained the overall leader, as he has since the rally started last Saturday.
Asked about a fourth Dakar win, he said: "For victory, it is difficult to say – the Dakar is the Dakar. But we need to be careful and we need to be strong all the way. We need to have a good pace without any relaxing because when you relax you make a mistake.”
Orlando Terranova won his first stage since 2015, when the rally was in his Argentine homeland, followed a minute later by Mattias Ekstrom of Sweden.
Daniel Sanders of Australia won his third motorbike stage but was disappointed the special was stopped after less than an hour and 101 kilometres, a quarter of what was scheduled.
The riders were using the same course as the cars on Thursday but parts were considered unpassable. Sanders was not convinced, and annoyed he wasn't able to make up more than two and a half minutes on leader Sam Sunderland of Britain. Sanders was five and a half minutes behind Sunderland in third overall, up from fourth.
Sunderland was second on the stage, and Matthias Walkner of Austria third, and they remained 1-2 overall.
Ross Branch of Botswana, second on Thursday's stage, fell off his bike after a few kilometers and was taken to the medical tent. He didn't finish and was given a 15-hour time penalty.
The rally rests on Saturday and resumes on Sunday.