France's Arnaud Demare celebrates as he crosses the finish line to win the eighteenth stage of the Tour de France on Thursday. Photo: AP Photo/Christophe Ena

PAU, France - Frenchman Arnaud Demare flirted with the rule book on his way to holding off sprint rival Christophe Laporte and claim a well-deserved victory in the 18th stage of the Tour de France on Thursday.

Demare was set up in impressive fashion for a sprint finish by his Groupama team, who worked hard in the final kilometres to make sure Slovakian sprint king Peter Sagan's chances were limited.

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.

"I didn't battle all this time for nothing, I didn't give up in the mountains," said a relieved Demare, who had to fight through some tough mountain stages to avoid missing the time cut.

The Frenchman said he was also inspired by comments made by German rival Andre Greipel, who accused him of holding on to a car to make it through the mountains.

"I was thinking about Greipel," he added.

Britain's Geraint Thomas, of Team Sky, finished close behind to tighten his grip on the yellow jersey three days before the 21st and final stage in Paris.

The Welshman holds a 1min 59sec lead on Dutch rival Tom Dumoulin (Sunweb) and four-time champion and teammate Chris Froome heading into Friday's 19th stage.

Like us on Facebook

Follow us on Twitter