For Arnaud Démare, revenge was a dish best served hot. As the temperatures climbed into the 90s, the Frenchman emerged from the peloton to win his first victory of this year’s Tour – and then revealed his prime motivation was a hot-headed row with the German sprinter André Greipel 24 hours earlier.

On a day where Geraint Thomas finished safely in the pack to retain his 1min 59sec lead, Démare provided the main talking point. On Wednesday’s brutal stage in the Pyrenees he had come in nearly 30 minutes behind Nairo Quintana and was immediately hit by insinuations on Twitter by Greipel that he held on to cars up the final climb to make the time cut.

“Those comments made me more aggressive,” explained Démare, who blasted clear of his compatriot Christophe Laporte and Alexander Kristoff to win stage 18 from Trie-Sur-Baïse to Pau. “I was hurt by his comments. But the best answer I could give to Greipel was to win.”

Démare was so far back on Wednesday that he was still going up the Col du Portet just as Chris Froome was coming down to the Team Sky bus – and the pair passed each other just before Froome was brought down by a policeman. However, he had recovered sufficiently to take the stage – and Laporte’s second place ensured that it was the first time that French riders had finished first and second in a sprint stage since 1978.

“I sometimes regret that my performances are put in doubt,” added Démare, who was also accused of holding on to motorbikes in the 2016 Milan-San Remo race. “It is true that I am not the best rider in the mountain but I have worked hard to improve.

“And there is always criticism and jealousy. There were a lot of referees in Milan-San Remo and if I had done anything wrong I would have been punished. On the stage yesterday there were a lot of judges too. I have nothing to say to the critics, they can say what they want.”

Meanwhile Thomas was delighted at moving a step closing to winning his first yellow jersey.

“It definitely wasn’t an easy stage,” he said. “We were on the pedals all day and it was hot which made it tough. It was a really fast finale too which was a bit stressful, so I’m happy to make it through.”

The Welshman is only two days from Paris but he is refusing to think about the yellow jersey given that Friday’s final stage in the mountains and Saturday’s individual time trial are still to come. “I try to just think about it day by day. But obviously there’s one more big mountain day,” he said. “It’s the last road stage and we’re expecting a lot of attacks.”