Alberto Contador, left, leads third-place Lance Armstrong, right, by 5:24. ((Joel Saget/AFP/Getty Images))

Alberto Contador all but sealed his second Tour de France victory by keeping the yellow jersey after Saturday's punishing penultimate stage, and Lance Armstrong remained in third overall.

Sunday's final stage is a largely ceremonial ride into Paris that traditionally never features any breakaway attempts among the leaders, meaning only an accident can prevent Contador from going down the Champs-Elysée as the winner.

Armstrong held off a number of attacks from his closest challengers to virtually assure himself of finishing on the podium in his first Tour since 2005.

Juan Manuel Garate of Spain won the 167-kilometre Stage 20 from Montélimar to the dreaded Mont Ventoux, featuring a 21.1-kilometre ride up a very steep ascent.

Garate, who entered the stage more than 1½ hours behind Contador in the overall standings, clocked four hours, 39 minutes, 21 seconds, holding off fellow breakaway rider Tony Martin of Germany by three seconds.

Andy Schleck, who retained second overall, crossed third, 38 seconds back — in the same time as Contador. Armstrong was fifth, 41 seconds behind Garate, and Frank Schleck was sixth, 43 seconds back.

Armstrong succeeded in holding off the two challengers nipping at his heels for third. Bradley Wiggins of Britain began the stage 15 seconds behind the Texan and Frank Schleck of Luxembourg trailed him by 38.

Ryder Hesjedal of Victoria, the lone Canadian in the race, finished 35th in Saturday's stage and is 49th overall.

Armstrong said the start of the ride to Mont Ventoux was "a little aggressive."

"It was kind of simple, following Wiggins and following Frank Schleck," Armstrong said. "And I had the legs for that."

Contador had a comfortable margin over Andy Schleck. The 24-year-old rider from Luxembourg led at least a half-dozen attacks on the way up to the peak of the moonscape-like mountain.

"All I had to do was control Andy Schleck, and that's what I did," Contador said. "He attacked — it was a good day for him. I was able to rein him in."

Massive crowds lined the winding road up to the mountaintop, possibly shielding the riders from the winds swirling at the peak.

Overall, Contador leads Andy Schleck by 4:11 and Armstrong is 5:24 behind. Bradley Wiggins is fourth, 6:01 back, and Frank Schleck is fifth, 6:04 behind the Spaniard.

Garate said he had dreamt of the stage victory last night.

"This is what I was missing — to claim a Tour stage before retiring. Now, although my retirement is not close, I've made it home with the stage," he said. "What more can you ask for?"

Armstrong came into the race seeking an eighth Tour victory, but has impressed a majority of fans by finishing in the top three at age 37.

"Hey, I can't complain," Armstrong said. "Coming out here and getting on the podium with these young guys, it's not so bad."