World Rally champion Sebastien Ogier finished a topsy-turvy day at the Rally Catalunya with a four-second lead over team-mate Jari-Matti Latvala.
Volkswagen driver Ogier - who wrapped up a third successive title in Australia last month - was top of the pile after Thursday's solitary opening stage.
The Frenchman lost time in the first three stages of Friday's morning runs, though, with Mads Ostberg (Citroen) going top after stage three before a stellar run from Robert Kubica (Ford) on the following run put the Pole on top.
But both men found trouble on stage five - the last of the morning runs - as a puncture for Ostberg saw him drop 30 seconds, while Kubica suffered the same fate twice and fell out of the top 10.
That put Ogier back on top after five stages, but he again lost time in the first three afternoon runs.
Latvala impressed and stole a march to take the lead, while Ott Tanak (M-Sport Ford) posted similar times to the Finn as Ogier was bumped down to third.
However, Ogier produced a stunning stage nine - the only stage run on gravel and asphalt - in a 35.68-kilometre test of Terra Alta, with his run 7.2 seconds better than Latvala's.
That left Ogier with a lead over Latvala to take into Saturday's racing, while Tanak is 11.3 seconds back.