UPDATE 2-Cycling-Leaders flex their muscles as Nibali takes yellow

* Nibali leads Froome and Contador by two seconds * Top guns test each other in front of huge crowds * Tour leaves Yorkshire (Adds quotes, details) By Martyn Herman SHEFFIELD, England, July 6 (Reuters) - Italian Vincenzo Nibali claimed the Tour de France yellow jersey with a late attack on the second stage as the favourites flexed their muscles on a frantic climb into Sheffield on Sunday. Defending champion Chris Froome also laid down a marker with a burst of speed up the spitefully steep Jenkin Road, the ninth ascent of a long day, five kilometres from the finish in the former heart of Britain's faded steel industry. Spain's twice former champion Alberto Contador was also in the action as the world's biggest cycle race said goodbye to Yorkshire after two memorable days in the north of England. Enormous crowds lined the 201-km route from York, and thousands at the finish area on the site of a former steel forge, cheered as Italian champion Nibali turned on the power with just under two kilometres to go. There still seemed plenty of time for the chasers to hunt him down but the Astana rider got his head down in a stiff breeze to finish two seconds ahead of Belgian Greg van Avermaet and Pole Michal Kwiatkowski. Froome and Contador were safely in the bunch. "I think in the final kilometres they all tried to attack," Nibali, who finished third behind Bradley Wiggins and Froome in 2012, told a news conference. "Alberto was the first and Froome also tried to attack and control it but I was able to attack in the right moment and win the stage. But I don't want to lose my head. "The Tour de France doesn't stop here with this yellow jersey, we have almost three weeks to go." With Mark Cavendish abandoning the race in the morning after his heavy crash in Harrogate on Saturday, all eyes were on Froome to give the home crowds something to cheer. His late burst on the steepest hill on the whole of this year's Tour, if one of the shortest, was an impressive show of strength but he ultimately had to play second fiddle to Nibali. "It was more about staying out of trouble and stay at the front of the race and not lose any time gaps to my opponents," Froome told reporters, after warming down on the rollers outside the Team Sky bus. "It was a huge today with all the main contenders putting in a few moves. Nibali came out on top taking two seconds." TRICKY DESCENT Asked whether his attack had been a challenge to his rivals, he said: "It wasn't really to let them know I was around. It was more that the descent was tricky and I wanted to come down (the Jenkin Road climb) at my own pace." Contador, who came 13th but lost no time, said the priority had been to test his strength. "The most important thing was to be well placed (in the peloton), there will be a lot more stages to attack," he said. "Today I'm there. It was impossible to really attack on the last climb because it was five kilometres to go. "Nibali did a good job, he is a strong rider, but for me the outcome today was not a problem." Like several others, however, he said the enthusiastic crowds had been endangering the riders. "It's great to see but when you go downhill at 90kph or across villages with stray dogs it's dangerous. I'm glad I didn't crash because I was not so lucky in recent years." Ramunas Navardauskas was so angry at people jumping in front of him to take photos that the Garmin-Sharp rider knocked several phones flying while American Tejay van Garderen (BMC) said on Twitter: "People standing in the middle of the road with their back turned while 200 cyclists come at you, just to take a selfie! "A dangerous mix of vanity and stupidity." Pre-stage favourite Peter Sagan of Slovakia, who took fourth place, is second overall two seconds off the pace. Froome and Contador are fifth and eighth overall, also two seconds behind Nibali. Germany's Marcel Kittel, who began the day in yellow, had a miserable day, losing 19 minutes after appearing to crack on the long haul up the Cote de Holme Moss, a 4.7-km climb that attracted crowds of an estimated 60,000 fans. Monday's stage will be one for the sprinters, a 155-km charge across flat countryside from Cambridge into London. (Editing by Julien Pretot)