It happened on the race's fourth stage in the finish town of Vittel, after a quiet day of racing that eventually saw the sprinters' teams setting up their fast men for the finale.
As the leaders raced for the line at speeds approaching 40 mph, Cavendish tried to come around Sagan but appeared to be knocked into the barriers and onto the ground. Cavendish was taken to the hospital for X-rays.
You can watch the crash in the video clips below:
"We've decided to disqualify Peter Sagan from the Tour de France 2017 as he endangered some of his colleagues seriously in the final metres of the sprint which happened in Vittel," said the president of the race commission, Philippe Marien.
"We will apply article 12.104 of the rules of the UCI ... in which case commissaires (the race jury) can decide to enforce a judgment to disqualify a rider."
Was it Sagan or Cavendish in the wrong?
The problem is it's dificult to tell clearly who was at fault in the crash.
It would appear from the front view that it is Sagan's elbow pushing Cavendish into the barrier. But that may not be accurate. Some say Cavendish may have been trying to create a hole that just wasn't there, and Sagan could have actually been hit from behind by the faster-accelerating Cavendish. Sagan may have had his elbow out by instinct as he was trying to balance himself after being hit.
The aerial view does not help much because there are trees in the way.
Social media blew up on the news that Sagan was being disqualified from the race as he's the most popular rider in the pro peloton. Some, including former pro cycling sprinters, didn't see wrong in his actions.
To make matters worse, two trailing riders could not avoid Cavendish and went over the fallen rider as Frenchman Arnaud Démare crossed the line first to win his first-ever stage at the Tour.
But Cavendish said Sagan had to explain his actions, AFP reported.
"I was just following Demare round and then Sagan just came over," he said. "I get on with Peter well but I don't get it. If he came across it's one thing, but the elbow? I'm not a fan of him putting his elbow in like that. I get on with Peter a crash is a crash, but I'd just like to know about the elbow."
AFP reported that Cavendish's sports director at Dimension Data, Roger Hammond, told journalists: "If I was Sagan, I'd apologize for that." Fellow sprinter Andre Greipel of Germany accused Sagan of doing the same thing to him the previous day.
Sagan won the past two road world championships and is widely regarded as the most talented rider of his generation who can win many kinds of races. He is immensely popular as a cycling star and is a multiple Tour-stage winner and five-time winner of the Tour's green jersey, which is awarded to the race's most consistent daily finisher.
Cavendish has won the second highest number of stages in the Tour — 30 so far. Belgian legend Eddy Merckx has won 34. "Cav" is considered to be one of the sport's greatest sprinters.
Here's Sagan's team's statement:
"The UCI World Champion Peter Sagan was disqualified today, according to article 12.1.040/ 10.2.2. (irregular sprint) in the result/communiqué. The team disagrees with the decision and protested it officially.
"Peter Sagan rejected to have caused, or in any way intended to cause the crash of Mark Cavendish on the final 200m of the stage. Peter stayed on his line in the sprint and could not see Cavendish on the right side.
"The team applied for a redress of Peter Sagan's result in stage 4.
“In the sprint I didn’t know that Mark Cavendish was behind me. He was coming from the right side, and I was trying to go on Kristoff’s wheel. Mark was coming really fast from the back and I just didn’t have time to react and to go left. He came into me and he went into the fence. When I was told after the finish that Mark had crashed, I went straight away to find out how he was doing. We are friends and colleagues in the peloton and crashes like that are never nice. I hope Mark recovers soon.” —Peter Sagan, UCI World Champion