The Belgian national champion, one of defending champion and overall leader Tadej Pogacar's domestiques, jumped away from a leading group of six some 43 kilometres from the finish and never looked back, beating compatriot Victor Campenaerts (Visma-Lease a Bike) by 1:28. France's Julian Alaphillipe took third place, nine seconds further back.
Wellens' master, Pogacar, still leads Denmark's Jonas Vingegaard by 4:13 in the overall standings, edging 169.3km closer to a fourth Tour title after the hilly ride between Muret and Carcassonne. German Florian Lipowitz sits in third place, 7:53 off the pace.
The top guns stayed quiet all day, with Pogacar slowing down after Lipowitz and Vingegaard were caught up behind an early crash.
It was a hectic stage with relentless attacks from riders looking for a rare occasion of a victory, as flat and mountain stages are the exclusive domain of top sprinters and general classification contenders.
The group that would fight for the win took a definitive shape after more than 100 kilometres and Wellens was not only the strongest rider but also the smartest.
Having done very little in the breakaway - one of the perks of riding for the yellow jersey holder - he attacked on a slightly uphill section, catching everyone off guard.
The 34-year-old crushed the pedal and the chasing group quickly disappeared in the background as he sped to his maiden Tour de France win to complete his grand tour stage victory collection after prevailing in the Giro d'Italia in 2016 and 2018 and in the Vuelta a Espana in 2020.