Czech rider Roman Kreuziger (Astana) won the 19th stage of the Giro d'Italia overnight as Joaquim Rodriguez narrowly held on to the overall lead.
We had to attack Ryder but in the end it was he who gave us a lesson. Now he has the race in his hands. As long as he doesn't make a mistake he'll be impossible to beat.
Katusha's Spanish rider Rodriquez lost time to Garmin-Barracuda's Ryder Hesjedal but held onto the leader's pink jersey by 17 seconds with two stages remaining having started this first of two days in the Alps half a minute up on his arch rival.
At the end of this 198km mountainous run featuring five classified climbs and culminating in the category one summit finish, Kreuziger crossed the line 19 seconds up on Hesjedal.
Rodriquez came through in third, at 32 seconds.
In fourth was last year's Giro winner, Italian Michele Scarponi, who is lying third now in the overall standings, at 1minute 39 seconds.
The big loser of the day was Ivan Basso.
Placed third, at 1 minute 22 seconds, overall before the start of the day's action the Italian came home 40 seconds behind Hesjedal.
Despite holding on to his lead Rodriguez conceded that the race was now Hesjedal's to lose.
Rodriguez said: "We had to attack Ryder but in the end it was he who gave us a lesson. Now he has the race in his hands. As long as he doesn't make a mistake he'll be impossible to beat."
Hesjedal was thrilled with what he termed his "great stage".
The Canadian said: "In the closing stages I felt I still had the strength and I went on the attack. I finished very tired but I'm confident and reckon I can once again put up a good defence tomorrow (Saturday) on more very tough climbs."
Rodriuguez admitted he would have cracked had he tried to keep pace with Hesjedal, and revealed it was a painful stage for him.
“Tomorrow is a very important stage. I suffered today but as I’ve always said, the Giro d’Italia is fought day after day, all the way to Milan. Ryder is good at time trials and so he’s not a surprise for me," he added.
“We climb the Mortirolo tomorrow. It’s a climb I like a lot. A lot of riders have won the Giro d’Italia on these steep slopes but others have lost it. I jus t hope to have a great day.”
A 17-man group broke away from the peloton at the start to attack the first climb, the Passo Manghen, with a lead of almost nine minutes.
On the first passage through the Pampeago summit France's Sandy Casar and Italian Stefano Pirazzi were duellling up front.
Kreuziger made a forward move away from the main pack on the climb up Passo Lavaze at 30km from the finish, accompanied by Italian Dario Cataldo.
He joined pacesetters Pirazzi and Casar at the 4km mark, before leaving this duo behind shortly after as he made his successful bid for glory.
The 26-year-old Czech was celebrating his first ever stage win in the Giro after finishing last year's race as best young rider, in fifth place overall after Alberto Contador's disqualification.
He said: "This is my first win on a big tour, I'm happy with it but not totally as I came here to make an impression on the overall standings. I know full well that if I'd been in a strong position overall the others wouldn't have let me forge clear."
With Hesjedal fancied to upstage Rodriguez in the closing time-trial, the Spaniard goes into the penultimate stage today knowing he will have to ride for his life if he is to retain the pink jersey after tomorrow's finish in Milan.
Today's second day in the Italian Alps is a 219km run featuring the dreaded Mortirolo, one of the toughest climbs in Europe, before reaching the Passo Stelvio summit, at 2757m altitude the highest point of the Tour.
Don't miss the last two stages of the Giro d'Italia 2012, LIVE on SBS TWO. For full details, see our event page.
1. Roman Kreuziger (CZE) Astana 6hr 18min 03sec
2. Ryder Hesjedal (CAN) Garmin-Barracuda 0:00:19
3. Joaquim Rodriguez (ESP) Katusha 0:00:32
4. Michele Scarponi (ITA) Lapmre-ISD 0:00:35
5. Domenico Pozzovivo (ITA) Colnago-CSF Inox 0:00:43
6. Ivan Basso (ITA) Liquigas 0:00:55
7. Rigoberto Uran (COL) Sky 0:00:57
8. Mikel Nieve (ESP) Euskaltel-Euskadi 0:01:18
9. Stefano Pirazzi (ITA) Colnago-CSF Inox 0:01:22
10. John Gadret (FRA) Ag2r-La Mondiale 0:1:22
1. Joaquim Rodriguez (ESP) Katusha 84hr 06min 13sec
2. Ryder Hesjedal (CAN) Garmin-Barracuda 0:00:17
3. Michele Scarponi (ITA) Lampre-ISD 0:01:39
4. Ivan Basso (ITA) Liquigas 0:01:45
5. Rigoberto Uran (COL) Sky 0:03:21
6. Domenico Pozzovivo (ITA) Colnago-CSF Inox 0:03:30
7. John Gadret (FRA) Ag2r-La Mondiale 0:05:36
8. Thomas De Gendt (BEL) Vacansoleil-DCM 0:05:40
9. Sergio Henao (COL) Sky 0:05:47
10. Damiano Cunego (ITA) Lampre-ISD 0:06:09