The Team Sky rider Geraint Thomas has warned that British crowds taking selfies are endangering the safety of riders at the Tour de France, while the American Tejay van Garderen called the craze “a dangerous mix of vanity and stupidity”.

Thomas, after putting in an immense effort to shepherd Chris Froome through Sunday’s second stage from York to Sheffield, described the thousands of people attempting to take pictures of themselves as the peloton rode past as “the new pain in the arse” for riders.

“The worst thing is when people have got their backs to the peloton taking selfies,” he said. “I had a few of those and they don’t see us coming and are stood in the road and it is very dodgy.

“If you are on the front you can see it, but if you are a couple of people back you suddenly see them and you can hit them. There have been too many big accidents with riders hitting spectators and you don’t want to see that.

“There is not much racing on British roads and people don’t understand how fast we go and how much of the road we use. If they want selfies they should stand on a wall.”

Watch highlights of stage two Guardian

Van Garderen expressed his disbelief on Twitter, adding: “Standing in the middle of the road back turned while 200 cyclists come at you, just to take a selfie? I love the crowds and thank you for your support. But please give us room.”

As the riders went through Ripponden, the Lithuanian Ramunas Navardauskas was seen angrily swiping at anyone who got too close. The Tour second favourite, Alberto Contador, who finished in the bunch behind the winner Vincenzo Nibali, called it “a very risky day”. “I’m just very thankful to have got through; it was an extremely nervous stage with so many spectators,” he said.

Froome denied he was making a show of strength by powering past his main rivals on the Jenkin Road shortly before Nibali’s breakaway. “I wasn’t necessarily trying to let them know I was around, but I knew the descent coming up straight afterwards was tricky and I preferred to take that at my own pace,” he said. “It was more about staying out of trouble, keeping at the head of the race and making sure I didn’t lose any major time on my rivals than trying to win the stage.”

The riders battle up the Jenkin Road. Photograph: Thomas van Bracht/Demotix/Corbis Photograph: Thomas van Bracht/ Thomas van Bracht/Demotix/Corbis

Froome, last year’s Tour de France winner and this year’s favourite, was also more generous about what he called the “unreal” crowds after a thrilling day’s racing. “All the main contenders were putting in a few moves in the final few kilometres,” he said.

“Nibali came out on top, taking two seconds off us, but it was another incredible day with massive support out on the roads of Yorkshire. Going up Holme Moss I was covered in goosebumps, and to have everyone cheering for us was simply incredible.”

Froome is in fifth place, two seconds behind Nibali – a position that Sky’s team principal, Sir Dave Brailsford, said was “100% good for us”. “If Astana want to defend the yellow jersey they will have to work for it,” said Brailsford, who confirmed that Richie Porte was fine after a minor crash. “The question of course is whether they will.

“It was a difficult day, a very nervous day,” he added. “The crowds were very enthusiastic and supportive and it was like a wall of noise out there. But the riders had to concentrate more. The worst-case scenario is that everyone steps back except a small child who is left right there in front of them.”

Christian Prudhomme, the director of the Tour de France, insisted the two days in Yorkshire had been “very special. [Five-times tour winner] Bernard Hinault said to me it is the first time in 40 years on a bike that he has seen crowds like we saw this weekend.

“What you did was good for Yorkshire, for sure, but what you did was also good for the Tour. When you said you would deliver the grandest Grand Départ it was the truth. You have raised the bar for all future hosts of the Tour de France.”