Alto de las Allanadas - Chris Froome produced a stunning breakaway up a steep summit finish on the 199.8km fourth stage of the Ruta del Sol to take a two-second lead over Alberto Contador into Sunday's final stage.
Contador had held a 27-second lead over the 2013 Tour de France winner after winning their first battle of the season on a mountain finish in Friday's third stage.
However, Froome had his revenge on the gruelling 4.4km climb to the finish line at Alto de las Allanadas to take the stage in 5:08.54 and grab the narrowest of advantages over his Spanish rival.
"I’m absolutely blown away to have pulled that off at the end there," said Froome.
"I came into this race thinking that I'm here to find my legs, test them, and see where I'm at. To have been able to win the stage and go into the race lead today is incredible."
Contador was second with Froome's Sky team-mate Mikel Nieve back in third.
"Some days you win, some days you lose," said the two-time Tour de France winner.
"I think it is great that the Ruta del Sol is such a fantastic race, that it is such a show and closely fought."
Contador announced his intention to retire at the end of the 2016 season earlier this week, but wants to become the first man since Marco Pantani in 1998 to win both the Giro d'Italia and the Tour de France in the same season before he bows out.
"I am very happy with how my preparation is going. Yesterday when I won everyone said I was so strong, but I have my own plan. I am going a bit slower at this stage of the season than in the past with the Giro in mind."
Froome is now firm favourite to claim the overall win on the flatter 169.8km stage from Montilla to Alhaurin de la Torre.
However, he insisted that Contador can never be written off.
"This race is not over until it's over though. In the last few years I've learnt that Alberto never gives up."
Results from the fourth stage of the Ruta del Sol, a 199.8 km ride from Maracena to Alto de las Allanadas on Saturday:
1. Chris Froome (GBR/SKY) 5hr 08min 54sec
2. Alberto Contador (ESP/TCS) at 29sec
3. Mikel Nieve (ESP/SKY) 49sec
4. Sylvester Szmyd (POL/CCC) 59sec
5. Benat Intxausti (ESP/MOV) 1min 00sec
6. Wilco Keldermann (NED/TLJ) 1min 13sec
7. Sebastien Reichenbach (SUI/IAM) 1min 26sec
8. Romain Bardet (FRA/ALM) 1min 27sec
9. Nicolas Edet (FRA/COF) s.t.
10. Jurgen van der Broeck (BEL/LTS) 1min 38sec
Overall standings
1. Chris Froome (GBR/SKY) 17hr 32min 16sec
2. Alberto Contador (ESP/TCS) at 02sec
3. Benat Intxausti (ESP/MOV) 2min 32sec
4. Mikel Nieve (ESP/SKY) 2min 52sec
5. Romain Bardet (FRA/ALM) 3min 13sec
6. Peter Kennaugh (GBR/SKY) 3min 50sec
7. Kanstantsin Siutsov (BEL/SKY) 5min 07sec
8. Nicolas Edet (FRA/COF) 5min 10sec
9. Sylvian Chavanel (FRA/IAM) 5min 30sec
10. Sergio Pardilla Belon (ESP/CJR) 5min 44sec