PAU, France -- Arnaud Demare was rewarded Thursday for hauling his muscular frame over the Alps and through the Pyrenees.
Geraint Thomas, meanwhile, is preparing to cement his hold on the yellow jersey in Friday's final mountain test of the Tour de France.
After many of his competitors were unable to get through the mountains, Demare took advantage by dominating a mass sprint in Stage 18.
It marked the first victory by a French team, Groupama-FDJ, in this year's race.
Sprinters Fernando Gaviria and Dylan Groenewegen -- who had each won two stages in this Tour -- called it quits during Stage 12 to Alpe d'Huez. That came a day after Mark Cavendish and Marcel Kittel, who have a combined 44 Tour stage wins between them, failed to make the time cut on another mountain leg.
Demare said he was motivated by an accusation on social media from Andre Greipel, a top German sprinter, who alleged that Demare held on to his team car on the way up the grueling Col de Portet in Stage 17.
Demare finished Wednesday's stage second to last but managed to avoid the time cut as thousands of French spectators cheered him on.
Greipel, who also quit in Stage 12, later apologized on Twitter, saying he had relied on "incorrect" information.
"It hurt me enormously," Demare said. "It's a shame that people cast doubts over my performance and my hard work. ... I thought a lot about [Greipel] today. It's not in my mindset or my philosophy to [cheat]. I worked hard in the mountains before the Tour, and as a result, I made it through mountain stages when most of the sprinters did not."
Demare, who failed to make the cut on a climb in the Alps last year, had time to celebrate as he crossed the line with his arms wide open ahead of fellow Frenchman Christophe Laporte.
Alexander Kristoff of Norway crossed third in the same time.
After two grueling days in the Pyrenees, Thomas was able to enjoy his seventh day in the yellow jersey during the less challenging 106-mile leg from Trie-sur-Baise to Pau, which featured only two minor climbs and a flat finish.
Thomas remained 1 minute, 59 seconds ahead of Tom Dumoulin with the Welshman's Sky teammate and four-time champion Chris Froome third, 2:31 behind.
Only two challenging stages remain -- a lengthy leg through the Pyrenees on Friday that includes three major climbs and a technical individual time trial Saturday -- before the mostly ceremonial finish on the Champs-Elysees in Paris on Sunday.
Stage 19 starts in the pilgrimage town of Lourdes and takes the peloton over legendary climbs such as the Col du Tourmalet and Col d'Aubisque.
"We're expecting the worst, hoping for the best. ... It's the last mountain stage, and I think guys will try to take every opportunity they can," Thomas said. "But we've been riding real well the whole race, so hopefully we can keep that going for one more day."
After Froome cracked on the Col du Portet, all of Sky's strategy is aimed at getting Thomas to Paris in yellow -- meaning Froome might have to help.
"Hopefully we won't have to use Froomey. Hopefully we'll have strength in numbers and he'll be able to just follow, as well," Thomas said. "But obviously having Froomey at my disposal, so to speak, is just phenomenal."
Perhaps a bigger worry for Thomas and Froome concerns the unruly fans who have consistently affected this Tour by spitting at riders -- or even reaching out to grab them.
One fan who reached over the barriers nearly took Thomas down Wednesday.
"I thought it was maybe an accident, just maybe an overly exuberant fan," Thomas said. "But when I got back to the hotel and was showed the pictures, it was obviously something else. It's not nice. It's not what you want."
Dumoulin knows he needs a miracle of sorts to take the yellow jersey.
"I think the chance of winning the Tour is really, really small. But if I see an opportunity, I will take it for sure," Dumoulin said. "I will try to test Thomas. We will see if it's possible."
On a warm day in southern France, Stage 18 took riders through the vineyards of Madiran to the city of Pau, the birthplace of 16th-century king Henri IV. It was the 70th time the Tour passed through Pau, which first hosted the race in 1930.
Five riders -- Guillaume Van Keirsbulck (Wanty-Groupe Gobert), Mathew Hayman (Mitchelton-Scott), Luke Durbridge (Mitchelton-Scott), Niki Terpstra (Quick-Step Floors) and Thomas Boudat (Direct Energie) -- were involved in an early breakaway. The sprinters' teams never let them get much more than two minutes ahead, and they were caught with 16.5 kilometers to go.
Otherwise, it was a very calm stage except for a minor crash involving Stage 17 winner Nairo Quintana and British rider Adam Yates midway through the route. Both riders got back on their bikes and continued without apparent problems.