METZ, France — Peter Sagan of Slovakia avoided a bloody, across-the-road pileup to capture a stage for the third time at the Tour de France on Friday, while Fabian Cancellara of Switzerland also steered clear of the mayhem to keep the yellow jersey.
The 129-mile ride from Epernay to Metz began in the Champagne region of France, with roadside fans holding aloft glasses of bubbly to cheer the riders.
But as the pack picked up speed to chase four breakaway riders with about 16 miles to go, at least two dozen riders spilled across a rural road. Many were downed and dazed, looking for team staffers in a jumble of injured riders and bikes.
‘‘It was like a trench hit by a [grenade] when I entered the crash to give my bike to Bauke,’’ Rabobank’s Laurens Ten Dam said on Twitter, referring to teammate Bauke Mollema. ‘‘Lots of blood and screaming. Carnage.’’
The US Garmin-Sharp team bore the brunt of the crash.
Tom Danielson, who finished last year’s Tour in eighth place, was already nursing a separated shoulder from a crash earlier in the week. In Friday’s spill, he was briefly knocked unconscious, and later rushed to a hospital for hip, collarbone, and elbow injuries. He was one of at least four riders to drop out because of the crash.
‘‘It was the scariest crash I’ve ever been in,’’ Garmin veteran David Millar said.
Millar had black marks of chain-grease all over his arm and said the riders were going at least 43 miles per hour at the time.
‘‘God knows how it happened,’’ Millar said.
Garmin’s Ryder Hesjedal of Canada — winner of the Giro d’Italia in May — injured his knee and lost more than 13 minutes, all but ending his chances for a top-three finish. He had started the stage in ninth place, 18 seconds back.
A Tour medical report listed 27 riders as injured on the day — two hospitalized from the first crash, and eight from the second. Aside from Danielson, Tour officials listed the other dropouts as Mikel Astarloza of Eustaltel-Euskadi, Davide Vigano of Lampre, and Wouter Poels of Vacansoleil.
The one-day tally eclipsed the four withdrawals due to either crashes or illness across six previous days in total.
Overall, Cancellara leads Bradley Wiggins — who is hoping to become the first Briton to win the Tour — by seven seconds.
The race moves into the mountains Saturday with a 123-mile ride to the ski resort of La Planche des Belles Filles in the Vosges.