Froome is in third place, a further 32 seconds behind, and is said to have all but conceded that he won't be defending his crown and will throw his support behind teammate, Thomas. But with so many teams eager to chase, they were eventually reeled in 17km from the finish.
But Demare veered from his line when he launched his final burst from inside 200 metres, prompting Laporte to gesture in protest as the Cofidis rider crossed the finish in second place.
Results for Stage 17, Tour de France on Wednesday. But his day went from bad to worse when he was making his way back down from the summit finish of the Col du Portet.
With some riders still clambering towards the finish line, a gendarme mistook the four-time victor for a fan and asked him to stop, causing Froome and his bodyguard to crash.
Froome was left furious at the officer and was then filmed shouting "fuck you" at the man after he was back on his feet.
It was a disgusting incident but Gilbert, who was shaken and bleeding, jumped back on his bike to ride the further 60km to complete stage 16 on Tuesday (Wednesday NZ time). And hope Team Sky do the rest.
Race leader Thomas survived an attempt by a spectator to pull him from his bike, just as he attacked to increase his overall time advantage.
Roglic attacked consistently in the last 50km of racing and then bombed the descent from the Col d'Aubisque to escape the clutches of the yellow jersey group of Geraint Thomas (Team Sky).
Yesterday's Tour de France Crashes
Bales of hay blocked the road 30 kilometers (18.6 miles) into the 218-kilometer stage from Carcassonne to Bagneres-de-Luchon. In the end it was British rider Yates who won the climb to Col du Portillon, and looked set to win his first Tour stage.
Yesterday, Brailsford apologised for suggesting the nasty reception his team have received at the Tour deFrance is a "French cultural thing".
"I did not see him crash", Sagan's teammate Daniel Oss said after the race.
If he avoids disaster on the way to the Champs Elysees in Paris on Sunday, Thomas will make history as the first Welsh victor of the Tour.
After the race had finished, Froome was caught by a police official and tackled down.
Quick-Step bosses panicked when Gilbert went over the wall - it was on the same descent, albeit several kilometres below, that Italian Fabio Casartelli died in a awful crash in 1995.
A scan revealed he had sustained a fractured kneecap and the Belgian has been ruled out of the Tour. "We gambled and we lost, but we gave it a good crack anyway". "Tomorrow it will be a crucial time trial I will try everything", said Roglic. "G has ridden such an incredible race and he deserves to be in yellow - and, fingers crossed, he holds it now until Paris".
"We just got to look after (Thomas) now", Froome said.
On Thursday the riders head out of the mountains with a 171km flat stage from Trie-sur-Baise to Pau.