(CNN) -- Alejandro Valverde all but wrapped up victory in the Tour of Spain with a solid ride in a time trial on the 20th and penultimate stage which was won by Britain's David Millar.
Valverde is comfortable in gold ahead of the final stage of the Vuelta.
Australia's Cadel Evans finished third to Millar on the 27.8 kilometer individual test in Toledo to move into the third and final podium spot ahead of Italy's Ivan Basso.
Valverde claimed seventh spot to hold a 55-second advantage over Spanish compatriot and Samuel Sanchez going into the final stage into Madrid on Sunday.
2008 Olympic road race champion Sanchez pushed Valverde all the way and claimed second on the stage to Millar, just five seconds behind, but had too much ground to make up to seriously challenge for the gold jersey.
Time trial specialist Millar, who rides for Garmin Slipstream, produced his fine ride before the major contenders for the overall classification had their own private battle.
He finished in 35 minutes 53 seconds to sharpen his preparation for a crack at gold in the world championship road race next week in Switzerland.
For Caisse d'Epargne's Valverde, victory in a major three-week tour is in his grasp after promising so often to deliver, while Evans has salvaged a disappointing season with a likely podium finish at the expense of Basso.
The final stage takes the riders 110.2 km from Rivas-Vaciamadrid to central Madrid and is expected to be contested by sprinters.
In other cycling news, Norway's Edvald Boasson Hagen wrapped up victory in the Tour of Britain in London.
The Team Columbia star started the final stage, a 92.5-km criterium around the capital, with a 23-second advantage over his nearest challenger, having won four stages of the seven previous stages.
Australia's Chris Sutton finished in third place in on the final stage to move up to second place overall while Germany's Martin Reimer took third.