schleck-andy100722ap

Andy Schleck of Luxembourg, right, hugs Alberto Contador of Spain after they crossed the finish line to win the 17th stage of the Tour de France on Thursday. ((Laurent Rebours/Associated Press))

Andy Schleck won the most prestigious stage of this year's Tour de France, but defending champion Alberto Contador of Spain was right on his shoulder Thursday Thursday in Col du Tourmalet, France, to virtually guarantee a third title.

Schleck knew he needed to pick up time on Contador in the 17th stage, and tried to break away with 10 kilometres left of the climb up the legendary Col du Tourmalet in the Pyrenees.

But Contador followed immediately and the two men completed the final kilometres of the stage almost side by side, in a stark representation of the two-rider battle that has been the story of this year's Tour.

They completed the 174 kilometres from Pau to the peak of the Col du Tourmalet in five hours three minutes 29 seconds. Contador retained his eight-second lead over his Luxembourg rival in the overall standings.

Ryder Hesjedal of Victoria enjoyed one of his most impressive performances on the tour, finishing fourth, one minute 27 seconds behind Schleck and Contador, and nine seconds back of Spain's Oliver Joaquin Rodriguez for third.

The ride bumped Hesjedal up to eighth overall.

"It's unreal. I knew I had good legs on the rest day, I did a nice little training. I just wanted to do a good showing today — job done," he told Versus.

"I feel really good, I feel like I'm getting stronger so a few more days and we're going to be real happy in Paris."

Hesjedal and Rodriguez were part of the chasing group that Schleck and Contador had earlier broken away from.

"Those guys went," said Hesjedal. "The first reaction is everyone wants to follow but those guys just go. I was just content to be around guys that are close to me.

"I think everyone knew how hard it was going to be and I stayed in a good group there, felt good in the last part and just gave it everything."

Schleck and Contador braved fog and rain, as well as the flags of supporters hitting them in the face during the climb.

French President Nicolas Sarkozy was on the top of the mountain to greet them.

"The image of Alberto and Andy side by side was a great image of sport," the president said. "Alberto may win, but Andy will win next year."

Earlier, the 2008 champion Carlos Sastre of the Canadian-owned Cervelo Test Team made a valiant attempt to make up the more than nine minutes separating him from Contador, breaking out alone in search of the lead group after 25 kilometres, aided by his teammate Ignatas Konovalovas, who dropped back from the leaders.

But he was never able to bridge the gap, and was caught by the peloton just before the start of the Tourmalet. He later slipped further back.

Michael Barry of Toronto was 104th in the stage to sit 99th overall.

Anthony Charteau of France finished in 27th place having done enough to guarantee he would be the overall winner of the polka-dot jersey for best climber.

In a lighter moment, on the second climb of the day, the Col du Soudor, the peloton was briefly disrupted by a group of sheep that crossed the road just as the riders arrived. No rider fell but several were forced to brake hard and stop.

The Pyrenees are behind the riders now, and after four days of struggling at the back over the climbs, the sprinters are likely to fight out the win in Friday's 18th stage, a 198-kilometre virtually flat ride from Salies-de-Bearn to Bordeaux.

Cervelo's Thor Hushovd of Norway holds the green jersey of points leader ahead of Italy's Alessandro Pettachi, with Mark Cavendish of Britain also in the hunt for the stage win and hoping for the green jersey when the riders reach Paris.

The Tour finishes in Paris on Sunday.