Spaniard Luis Perez Rodriguez (Caja Sur) won Thursday's 153.5km 18th stage of the Tour of Spain between Talavera de la Reina and Avila.
Russia's Denis Menchov (Rabobank) retained the leader's gold jersey.
Rodriguez, who announced his retirement at the end of the Vuelta on Sunday, finished 41 seconds ahead of a dozen riders which included Menchov and his main rivals, Spaniard Carlos Sastre (CSC) and Australian Cadel Evans (Predictor-Lotto).
Evans and Sastre moved into second and third place respectively overall after this 18th stage, while Russian Vladimir Efimkin (Caisse d'Epargne) slipped from second to fifth place after arriving more than three minutes behind the winner.
"I'm the happiest person in the world," said Rodriguez, 33. The stage was
decided during the first climb on the category one Mijares with Sastre
attacking to try and close the gap on Menchov who fought on doggedly to retain first place overall.
However the breakaway caused problems behind with Efimkin slipping from second to fifth place after arriving more than three minutes behind the Menchov group.
"I knew that it was going to be a complicated stage in a tactical sense with a very difficult first climb," Menchov said. "When Sastre attacked, I had to respond. I think Sastre is the most dangerous."
There remains really only one more mountain stage, on Friday between Avila and Alto de Abantos, for Menchov's adversaries to surpass him.
World road race champion Paolo Bettini (Quick Step) pulled out of the Tour of Spain Thursday to begin focusing on his bid to successfully defend his coveted rainbow jersey. Bettini won a stage victory on the Vuelta and came runner-up on several occasions, and did not start the 18th stage. His Belgian teammate Tom Boonen has pulled out of the world road race championships due to injuries on his knee and back, the Belgian cycling federation said Thursday.
Quick Step's 2005 world champion has thus been forced to bring the curtain down on what has been a mitigated season by his high standards.
Boonen, who counts the prestigious Paris-Roubaix and Tour of Flanders one-day classics among his many victories, crashed last week during a stage on the Tour of Spain and abandoned the race complaining of back and knee pain.
A fitness test on Thursday confirmed Boonen's worst fears, and while his back is no longer a problem, he still has persistent pain in his knee.
The world championships will be held in Stuttgart, Germany on September 26-30, with the men's road race crown being disputed on the final day of competition.
1 Luis Pérez Rodríguez (Spa | Andalucia-Cajasur) 3:43:45
2 Cadel Evans (Aus | Predictor-Lotto) 00:00:41
3 Franco Pellizotti (Ita | Liquigas)
4 Samuel Sánchez (Spa | Euskaltel-Euskadi)
5 Denis Menchov (Rus | Rabobank)
6 Ezequiel Mosquera (Spa | Karpin Galicia)
7 Stéphane Goubert (Fra | Ag2r Prevoyance)
8 Carlos Sastre (Spa | CSC)
9 Maxime Monfort (Bel | Cofidis)
10 Vladimir Karpets (Rus | Caisse d'Epargne)
General classification after stage 18
1 Denis Menchov (Rus | Rabobank) 74:22:13
2 Cadel Evans (Aus | Predictor-Lotto) 00:02:27
3 Carlos Sastre (Spa | CSC) 00:03:02
4 Samuel Sánchez (Spa | Euskaltel-Euskadi) 00:04:01
5 Vladimir Efimkin (Rus | Caisse d'Epargne) 00:04:27
6 Ezequiel Mosquera (Spa | Karpin Galicia) 00:04:35
7 Vladimir Karpets (Rus | Caisse d'Epargne) 00:06:17
8 Igor Antón (Spa | Euskaltel-Euskadi) 00:07:47
9 Manuel Beltrán (Spa | Liquigas) 00:08:00
10 Carlos Barredo (Spa | Quick Step-Innergetic) 00:08:48
© BikeRadar & AFP 2007