After establishing a 0.3s gap to Ostberg on Thursday, Ogier set about extending his lead immediately, gaining five seconds alone on the 15km SS3.
Ostberg nevertheless remained second, and on the short run to Las Minas he overturned Ogier's advantage to move into the overall lead.
With his Ford was more suited to the slower stuff Ostberg gained another half second on SS5, Los Mexicanos, only for Ogier to then blitz the morning's final stage and move back into the lead.
The VW man was nine seconds clear of the field on the final 30km stretch, restoring him to the lead of the rally.
Ostberg, who slowed for what he feared was a puncture in the final stages, still lies second, 11.8s down.
Mikko Hirvonen was second fastest on SS4 and SS6 but was ultimately unable to match Ogier's pace, surrendering more than 16 seconds on the four morning stages.
Thierry Neuville in fourth was the only other man to finish within one minute of Ogier as several frontrunners hit trouble.
Chief among them was Jari-Matti Latvala, whose rally ended 500m into the opening stage when he hit a rock and broke his front wishbone.
Chris Atkinson also suffered a similar incident but managed to continue, limiting the damage by finishing ninth or higher on the remaining three stages.
Evgeny Novikov also struggled on the run to El Cubilete, although an electrical ECU was to blame for his loss of around seven minutes.
He lies 13th overall, more than 12 minutes down on Ogier.