France’s Romain Bardet struggles through a cloud of flare smoke at the Tour de France. (Peter Dejong/Associated Press)

The Tour de France threatened to descend into chaos as the riders ascended the Alps during Thursday’s Stage 12, with fans crowding the course and lighting flares, the smoke clouding the riders’ view. It got so bad that Vincenzo Nibali, the 2014 champion, was knocked from his bike and out of the Tour entirely as he attempted to navigate a smoke-filled tunnel of fans with 3.8 kilometers left on his ascent of Alpe d’Huez.

“There were two police motorbikes, I was following [rider Chris] Froome, I was feeling good, then it slowed and I fell down,” said Nibali, who finished the stage but later discovered he had fractured a vertebra in the wreck. “The blow gave me big pain in my back.”

The fans seemed to be directing most of their ire-filled over-enthusiasm toward Froome, the four-time winner from Team Sky who was cleared of doping accusations days before the Tour began earlier this month. On Thursday, a fan reportedly spat at the Englishman. Another gave him what Agence France-Presse described as “a hearty slap on the back.”

“On the roadside it’s been calm for the past 10 days or so, with very few anti-Sky or anti-Froome banners. But suddenly, we’ve seen a lot more,” Froome said, per AFP. “All I can do is renew calls for calm, for good sense and for serenity with regard to the riders on the Tour de France. Don’t whistle and, obviously, don’t touch the riders. Even if it’s just an over-friendly backslap.”

Geraint Thomas, the stage winner, overall leader and Froome’s Team Sky teammate, was booed as he crossed the finish line and when he stood on the winner’s podium, and Tour director Christian Prudhomme has had just about enough.

“The climb up the Alpe d’Huez was painful,” he said, per AFP. “The riders of the Tour, the champions of this race, need to be respected.”

While dramatic visuals of racers speeding through cordons of closely packed fans is one of the Tour’s selling points, it seems to be getting out of hand. Prudhomme singled out selfie-taking fans — suggesting officials could ban them from running behind riders during the mountain stages — and those who lit flares along the course.

“They have only one wish: to be on television and take a selfie,” Prudhomme told AFP. “We have no wish to see that again.”

“Rocket flares don’t belong on bike races. They make the riders breathe in noxious air, and they blind them,” he added. “It just doesn’t make sense.”

The Tour has faced such chaos in the past. During the 1975 Tour de France, a French fan punched Belgian five-time winner Eddy Merckx in his lower abdomen near the finish line of the 14th stage, with the blow and a broken cheekbone suffered in a spill three stages later dooming his chances.

“It did worse than wind Merckx: It ruptured the fragile pact, the bond of trust that exists between the riders and the public,” Bicycling.com’s Richard Moore wrote in 2015.

More recently, Team Sky rider Richie Porte claimed he was punched by a fan during a mountain stage in 2015 and later had words with a fan who yelled “Doper!” at him as he was riding back to the team bus at the end of the stage.

“I don’t think I deserve to be punched just for doing my job,” the Australian said at the time.

Read more from The Post:

LAFC player says he was called the n-word by a Portland Timbers player during a game

Danny Amendola ‘will probably never really understand’ Malcolm Butler’s Super Bowl benching

Fantasy football: The top 30 wide receivers for 2018

NFL training camp 2018 schedule and locations: When does your team report?

Olympic figure skating medalist Denis Ten killed in stabbing