Contador was second in the 12th stage, a 210.5-km ride from Bourg de Peage, after he was outsprinted by compatriot Joaquim Rodriguez.
Contador's lieutenant at Astana, Kazakh Alexandre Vinokourov, was third, four seconds behind.
Twice Tour champion Contador attacked in the final climb, a 3.1-km section at an average gradient of 10.1 per cent, and Schleck, who retained the yellow jersey, could not respond.
The Luxembourg rider was fifth in the stage, 10 seconds behind, and now holds a 31-second advantage over Contador two days before the Tour enters the Pyrenees.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
"We played it smart in the finale and we took a little bit of time off Andy; too bad we could not win the stage," Vinokourov told reporters. "It gives us confidence for the Pyrenees.

