TOURS, France (AP) — Germany's Marcel Kittel overtook Mark Cavendish at the line Thursday to win the 12th stage of the Tour de France, and Chris Froome stayed safely in the main pack to preserve his big lead.
Cavendish moved in front but Kittel gained ground and just beat him to the line to earn his second stage win in three days and third of this race.
About 20 riders were caught in a crash near the end, with some stuck under the bikes of others as wheels and frames jutted out at all angles.
Froome still leads Alejandro Valverde by 3 minutes, 25 seconds. The British rider is 3:54 ahead of two-time former champion Alberto Contador.
Cavendish, the Tour's best sprinter two years ago, has had a frustrating race. The British sprinter looked set to clinch his 25th career stage win of the Tour after his Omega Pharma QuickStep teammate Gert Steegmans got him in a great position to attack. But Cavendish did not have the legs to hold on and Kittel beat him by half a wheel length.
Peter Sagan finished third and still has a comfortable lead as he bids to win the contest for the sprinters' green jersey.
Looking to keep their riders near the front of the main pack and limit the risk of them being caught in crashes, Froome's Sky and Contador's Saxo-Tinkoff squads took turns pushing from the front.
Saxo-Tinkoff tried to pull away with about 3 miles left, but Ian Stannard helped Froome catch them.
German sprinter Andre Greipel was among the approximate 20 riders who were caught in the latest big crash of the Tour, and moments later Froome survived a delicate moment when he appeared to be nudged by Tom Veelers.
A five-man breakaway surged ahead early on. The group consisted of Spanish veteran Juan Antonio Flecha, Italians Francesco Gavazzi and Manuele Mori and Frenchmen Anthony Delaplace and Romain Sicard, and they built up a lead of about nine minutes after about an hour of racing.
The peloton rolled through vineyards and alongside the Chinon forest on a 136-mile route from Figures to Tours in the Loire valley, a picturesque region dotted with imposing French chateaus — the spiral-towered Chateau d'Usse, which dates from the 11th century, and the 16th century Chateau d'Azay-le-Rideau, which rests on the water.
Amid the sightseeing, there were still some minor crashes before the big one late on.
French riders Alexandre Geniez and Blel Kadri tumbled and Latvia's Gatis Smukulis fell off his bike in the feed zone. Canada's Svein Tuft went too fast around a roundabout and slid across the road. They all got back up and continued.
Andy Schleck, the 2010 Tour winner who had a disappointing time trial Wednesday — finishing nearly five minutes behind the winner Tony Martin — had to change his bike after a puncture and scampered back to rejoin the main pack.
Sicard dropped off the pace with a little under 30 miles to go, leaving only four in the lead group.
No breakaway has managed to go all the way yet on this Tour, because the peloton has been riding so aggressively, and the 35-year-old Flecha was the last rider to be caught, about 4 miles from the end.
Froome finished just behind Martin in Wednesday's time trial to extend his lead.