Sainz had to open the road in the 379km timed special within the stage taking the competition back to Haradh from Shubaytah.
He consequently gave up nearly five minutes to Peterhansel in the first 100 kilometres as he navigated the dunes of the Rub' Al Khali, but would limit the damage over the rest of the special, ending up eight minutes slower than the stage winner at the finish.
This will still allow Sainz to have 10 minutes in hand for the final 374km Haradh - Qiddiya test on Sunday.
Peterhansel looked set to overtake Toyota driver Nasser Al-Attiyah for second place for much of the stage, but a late charge from the reigning champion saw him come up just 10 seconds short of a stage win.
This means that that Al-Attiyah will enter the marathon finale as Sainz's nearest rival and with a six-second gap to Peterhansel, who will be running ahead on the road.
Local driver Yazeed Al-Rajhi is poised to finish a career-best fourth in his Toyota after a seemingly straightforward stage, whereas his long-time fifth-place counterpart Orlando Terranova has dropped down the order.
Mini driver Terranova was over half an hour off the pace, and has been overtaken by the two Toyotas of Giniel de Villiers and Bernhard ten Brinke in the general classification.
He is now on course to finish seventh ahead of Century buggy driver Mathieu Serradori.
Toyota driver Yasir Seaidan lost over an hour in the stage but still clings on to ninth place, albeit by just nine seconds.
Pierre Lachaume, who entered the day in 10th place in the PH Sport-run privateer Peugeot, crashed out less than 100 kilometres from the end of the stage and exited the rally.
Fernando Alonso was placed 113th in the joint running order for cars, trucks and SxS after his roll on Thursday, and completed the stage eighth-fastest.
He will go into the final stage in 13th place overall, over 40 minutes behind 12th-placed Martin Prokop.
General classification (top 10):
Driver / Co-driver
Giniel de Villiers
Bernhard ten Brinke
Trucks: Kamaz keeps dominating
Dakar 2020 champion-elect Andrey Karginov picked up his sixth stage win of the event, leading a Kamaz 1-2-3-4 on the day.
Karginov is nearly 39 minutes ahead of stablemate Anton Shibalov with one stage left to run.
Maz driver Siarhei Viazovich is increasingly secure in third place overall, with Dmitry Sotnikov of Kamaz inheriting fourth after problems for Ales Loprais.
SxS: Lopez's searing pace not enough
Reigning class champion Francisco Lopez was considerably quicker than his fellow SxS competitors through the 11th stage, as he beat nearest rival Aron Domzala by 11 minutes.
However, while Lopez could yet challenge Sergey Karyakin - who is now just three minutes ahead - for a second-place finish, leader Casey Currie will enter Friday as the overwhelming favourite for the overall crown.
While he went through the stage 17 minutes slower than Lopez, Currie will still have an advantage of three quarters of an hour for the final 347km of competition.