Adapta Ford driver Ostberg took full advantage of Friday's difficult conditions to establish himself in a surprise top spot. He heads a topsy-turvy leaderboard that began to take a more familiar shape as Loeb mounted a charge on the afternoon's longest stage.
The Citroens had struggled in the morning downpours, and lost more time on SS4, the first after the lunchtime service. But by the second run through the 44 kilometres of Terra Alta, conditions were improving.
Loeb's stage win on that test vaulted him from fourth to second, and brought him to within 25s of Ostberg, although he lost a few seconds on the subsequent Salou superspecial when the rain returned just before he ran.
The lead battle will now be decided over two days on asphalt - where Loeb has not been beaten in nearly a decade.
After a poor start to the day, Jari-Matti Latvala brought the remaining works Ford up to third place with improved pace on Friday afternoon. His compatriot Mikko Hirvonen went in the opposite direction in the second Citroen, falling to fourth thanks in large part to a troubled run on Terra Alta.
Ott Tanak, hero of the morning along with Ostberg, dropped from second to fifth in the the afternoon. The Ford protege was trying to avoid mistakes, but also grappling with a major loss of brakes.
His erstwhile team-mate Evgeny Novikov, running with Autotek and on DMACK rubber this weekend, gave the World Rally Championship's second tyre supplier a sensational stage win on Pesells. He moved up to fifth in the process, only to crash out on the next stage.
With Jarkko Nikara losing several minutes with a puncture and subsequent jack problems on Terra Alta, Super 2000 series leader Craig Breen is up to sixth overall.
Hans Weijs is currently seventh on his World Rally Car debut in the Citroen previously driven by Nasser Al-Attiyah.