Ostberg had grabbed the lead from Ogier after SS2 but then rolled 13 kilometres into the following stage.
That allowed Ogier to take over at the front, but he couldn't extend his lead as Citroen's Sordo went fastest in both SS3 and SS4.
The Spaniard trimmed more than eight seconds in total from Ogier, meaning the pair are separated by just 2.2 seconds ahead of this evening's Lisboa special stage.
Jari-Matti Latvala also gained time on team-mate Ogier, who admitted his earlier choice of softs all round - Friday's five stages take place without a full service - was not ideal.
Mikko Hirvonen was also hamstrung by set-up issues, and despite driving "at the limit" surrendered third to Latvala. He now trails Ogier by 17.1s.
Thierry Neuville, second to Sordo on SS4, lies fifth, the last man within one minute of Ogier.
Evgeny Novikov is a relatively comfortable sixth, albeit 1m08s down, as various problems afflicted those behind.
Michal Kosciuszko spun on SS3, allowing Nasser Al-Attiyah to slip by and into seventh.
Andreas Mikkelsen, meanwhile, lost his power steering just one kilometre into the 18km run through Ourique and lost more than two minutes as a consequence.
His difficulties promoted Martin Prokop and Dennis Kuipers into ninth and 10th respectively. Mikkelsen is 16th.
That means he trails Robert Kubica, who worked his way up to second in WRC2 despite suffering radiator damage in SS2.
The Pole was faster than all but Esapekka Lappi over SS3 and SS4.
His Citroen is now 23s behind Lappi's Skoda, with Elfyn Evans and Sepp Wiegand both less than eight seconds down the road.
- Sports & Recreation