With less than two miles left, Cavendish went down in a crash, scraping up his rainbow-colored jersey of world champion. He got back on his bicycle and rode gingerly to finish the stage. His Team Sky said he was banged up but appeared to have no serious injuries.
With Cavendish out of the picture, Greipel burst out of the depleted group of sprinters, and sped to the straightaway finish, a split-second ahead of Italy's Alessandro Petacchi and Dutch rider Tom Veelers.
"This is what we wanted. It's a good victory," said Greipel after his 14th victory in all competitions this year.
He said he didn't pay much attention to the late crash.
"I heard something behind me ... but 60 kilometers per hour, you don't worry about what happened behind," the Lotto-Belisol rider said in an interview with France-2 TV.
Despite the crash, Greipel said his victory was well-deserved.
"There were still really fast guys there for the sprint, and I think we just deserve this victory," he said, playing down a question about whether he savored it less because Cavendish was knocked out.
"I think it's no question about that," Greipel said. "I won a stage in the Tour de France!"
Dave Brailsford, manager of Team Sky, said Cavendish's injuries were "more superficial, just skin. We'll see later. After a crash like that, it's high emotion.
"When you hit the ground that fast, it shakes you up, it builds up adrenalin," he said. "We'll let the adrenalin ... calm down and see where we are later. Now he is OK. He is having a shower. It should be OK tomorrow."
The group spill also brought down riders like Garmin-Sharp's Robbie Hunter, and Cavendish's lead-out man on Sky, Bernhard Eisel of Austria and Brailsford hinted at his rider's mood afterward.
Rowland Hall graduate Levi Leipheimer finished in the main pack in Thursday's stage and sits in 38th place overall, 45 seconds off the lead.
Former Salt Lake City resident David Zabriskie is in 169th place overall, 13:26 off the lead.
Tour de France
Friday, 6 a.m.
TV • ESPN