Spaniard Alberto Contador claimed his third Tour de France title Sunday as seven-time champion Lance Armstrong made his final exit from the race. The 27-year-old Contador stayed safe in the main bunch and the last stage, over 102.5 km from Longjumeau, went to Briton Mark Cavendish for the second year in a row. Over three weeks, Contador showed some weaknesses in the mountains and almost cracked in the final time trial but it was enough for him to beat Luxembourg's Andy Schleck by 39 seconds. Russian Denis Menchov took third place, 2:01 off the pace. Contador said on the podium: “I'm happy, very happy. I've had difficult days, from a psychological and a physical point of view. Thank you to those who supported me. I would have wanted to be better, but I suffered a lot to get this result and words cannot describe what I feel right now.” The victory kept the Spanish flag flying high on the Champs-Elysees following triumphs for Oscar Pereiro in 2006, Contador in 2007, Carlos Sastre in 2008 and Contador again last year. The Spaniard took the overall leader's yellow jersey when he benefited from Schleck's chain problem Monday. He gained 39 seconds in the process, the exact time that separated him from Schleck at the end of the Tour. “It did not work out this time but next year, I will come back here in this color,” said Schleck, who won the white jersey for the best under-25 rider, as he pointed towards Contador's yellow jersey. Armstrong, 38, riding his last Tour de France, finished 23rd overall after losing all chance in the first mountain stage. But the seven-time champion drew some consolation as his RadioShack outfit won the team competition. That helped make up for an incident which delayed the start of Sunday's stage by 15 minutes when all RadioShack riders sported black jerseys with the number 28. They were expressing their support of the estimated 28 millions of cancer-affected people in the world and of Armstrong's Livestrong campaign to fight the disease. But organizers reminded them that competition rules say that the same jersey should be used from the prologue to the final stage and they were forced to change clothing before the start. “The idea was to talk about the significance, the magnitude of the disease. Unfortunately the commissars did not agree with this,” said Armstrong. “But in the end, we got more attention than we expected.” At the finish, Cavendish outsprinted Italian Alessandro Petacchi and New Zealand's Julian Dean in impressive fashion to notch his fifth stage win in this year's race. But it was Petacchi who narrowly clinched the sprinters' green jersey for the points classification. France's Anthony Charteau won the polka dot jersey for the best climber.