Contador had held a 27-second lead over the 2013 Tour de France winner after winning their first battle of the season on a third stage mountain finish, but Froome (Sky) turned the tables on the gruelling 4.4km climb to the finish line at Alto de las Allanadas to take the stage and two second advantage over his key rival.
(Simon Geschke, Chris Froome and Alberto Contador lead the classifications in Andalucia - AAP)
Contador was satisfied with his performance despite the competitive turnaround by Froome.
I'm satisfied with this tour, and of course especially with my performance yesterday. But at this moment of the season there will always be greater variations between the daily shape on each stage. Yesterday, I had a great feeling, today I didn't have the same legs. After the stage yesterday, people said that I was perhaps in too good a shape at this moment in my race schedule. But everything is going according to the plan and I'm on track with my preparations ahead of my season goals.
With a very narrow lead to defend, Froome is certain to come under pressure by Tinkoff-Saxo and Contador on the final stage, which finishes with a 500-metre climb on an average gradient of almost 15 per cent.