MENDE, France -- Joaquin Rodriguez of Spain won a hilly 12th stage of the Tour de France on Friday, beating title contender Alberto Contador in a two-man sprint to the finish.
Rodriguez and the defending champion burst from the pack in a steep final climb, leaving behind race leader Andy Schleck and overtaking several breakaway riders. Contador ended up gaining 10 seconds on his rival and now trails Schleck by 31 seconds.
Rodriguez, a 10-year veteran on the Katusha team riding in his first Tour, held off Contador in the last few hundred yards of the 131-mile course from Bourg-de-Peage to Mende.
Rodriguez stretched out his arms, looked back and smiled as he nosed Contador at the line in 4 hours, 58 minutes, 26 seconds. Contador's Astana teammate Alexandre Vinokourov was third.
"I knew to anticipate, and I knew it was going to be difficult," said Rodriguez, who won the Volta of Catalunya in April. "I did it perfectly. I knew I'd be able to resist Alberto."
Rodriguez said he had ridden well in the Tours of Italy and Spain in the past, but "I just needed to win in the best race in the world.
Schleck finished fifth and Samuel Sanchez of Spain placed sixth to remain third overall, 2:45 back. Levi Leipheimer of the United States finished 11th, 17 seconds off the lead as he tries to keep pace in the overall standings in hopes of securing a place on the podium in Paris. He is sixth overall, 4:06 behind Schleck.
Seven-time champion Lance Armstrong, who has ruled himself out of contention in his final Tour, lost time to the leader for a third straight day -- crossing in 57th place, 3:35 back of Rodriguez. He's 32nd overall, 21:16 behind Schleck.
The finish was destined for drama. In the final miles, the pack scaled the La Croix Neuve pass -- featuring nearly 1.2 miles with an average gradient of more than 10 percent.
Vinokourov and three other breakaway riders were the first at the foot of the climb. Initially, he and Belarus rider Vasil Kiryienko slugged it out and the Kazakh star rode out alone.
But with just over a mile to go, Contador caught Schleck off-guard by racing out wide in the climb and mustering a burst of speed. As the Spaniard rose up out of his saddle, his bike rocking side to side, Schleck couldn't or wouldn't lay chase -- and kept seated pedaling a steady rhythm.
Contador and Rodriguez then overtook Vinokourov, who is riding in his first Tour since serving out a suspension after being kicked out of the 2007 Tour for blood doping.
Schleck sensed he wouldn't keep up with Contador.
"I knew this was going to be a really tough climb," he said of La Croix Neuve. "I don't like this climb, it doesn't fit me. It's short and steep and you have to be explosive -- not right for the kind of rider that I am.
"I'm happy I lost only 10 seconds in the end," Schleck said. "I was not so surprised I couldn't stay with him in this climb."
Contador, too, thought he would have gained more time.
"I like this climb a lot. I felt good. I attacked too late, and I didn't know what state Andy was in," he said. "I was able to get a few seconds, it's good -- it shows I'm in form.
"It's always good to reduce the deficit, but it would've been better to get more than 10 seconds."
Tour organizers said U.S. sprint specialist Tyler Farrar of the Garmin-Transitions team dropped out of the race during Friday's stage. Neither they nor his team immediately explained why, though Farrar had been riding with a broken left wrist from one of numerous crashes on rain-slicked roads in Stage 2. Farrar finished third in the sprint finish Thursday that featured aggressive riding by HTC Columbia's Mark Renshaw, which got the Australian expelled from the Tour.
Saturday's 13th stage takes riders on a 121.8-mile run from Rodez to Revel that features five low-level climbs. Sunday marks the race's entree into the Pyrenees -- where riders will spend four punishing stages.