Spaniard Iban Mayo of Saunier Duval claimed the 179km 19th stage of the Tour of Italy from Treviso to Terme Di Comano on Friday.
Italian Liquigas rider Danilo Di Luca retained the leader's pink jersey.
Mayo, who has often been touted as a potential Tour de France challenger but has always flattered to deceive, made his break on a downhill section with 70km to race in driving rain.
He had one breakaway companion in Spain's Alberto Losada but he dropped him on the final climb of this semi-mountainous stage, with about 20km left to race.
A small chasing group formed but the little Basque climber held on to claim his first Giro success.
The 29-year-old Mayo was delighted with his victory. He won the l'Alpe d'Huez stage of the Tour de France in 2003 and then claimed the Dauphine Libere the following year but from then on had a tough time imposing himself in the major races.
There are just two stages left with only Saturday's 43km time-trial from Bardolino to Verona likely to shake up the pecking order. Di Luca leads Luxembourg's Andy Schleck by 2 minutes and 24 seconds.
"I'm feeling calm," Di Luca said. "Even if I lost 1 minute 30 seconds in the time trial [to Schleck], I would still have a 50 second buffer."
Though the 22-year-old Schleck has done wonders during this race it looks unlikely that he will be able to overhaul Di Luca for overall race victory.
He said he had never in his life ridden such a long time trial and would give his maximum to earn a podium finish by fending off Italians Gilberto Simoni, Damiano Cunego and Eddy Mazzoleni.
However a dramatic change of fortunes can happen. In 1984, France's two-time Tour de France champion Laurent Fignon was upstaged by Italy's Francesco Moser in the final time trial.