L'ALPE D'HUEZ, France — Christophe Riblon became the first Frenchman to win a Tour de France stage this year and Chris Froome boosted his overall lead despite a late struggle on Thursday's 18th stage.

Riblon caught American Tejay van Garderen with about a mile left on the second ride up L'Alpe d'Huez, one of the Tour's most famed climbs.

Riblon threw his hands up and pumped his fists after clinching the second Tour stage win of his career, three years after winning another mountain trek. Van Garderen finished 59 seconds behind in second, and Italian Moreno Moser was 1:27 behind in third.

"To raise my arms aloft at L'Alpe d'Huez is incredible," Riblon said. "With five kilometers to go I thought I had lost it."

He dedicated the win to his AG2R La Mondiale teammate Jean-Christophe Peraud, who fractured his shoulder in Wednesday's time trial and had to pull out.

"We wanted to end this bad spell," Riblon said.

Froome, 3:18 back in seventh, extended his comfortable lead over his main rival Alberto Contador to more than five minutes with just three stages remaining. He is edging closer to becoming the second British rider to win the Tour, following Sky teammate Bradley Wiggins' success last year.

He would have been further ahead had he not been hit with a 20-second time penalty. With about 2 miles left, he grabbed an energy bar from teammate Richie Porte — forbidden under race rules as riders are not allowed to take food within 3 miles from the stage end. Porte also got a 20-second penalty.

"That's one of those things that come with the race," Froome said. "I was really going into a little bit of a sugar low then. I don't know if it helped me ... I asked my teammate Richie Porte to get some sugar from the car."

The 107-mile route from Gap to L'Alpe d'Huez featured two HC ascents of L'Alpe d'Huez — meaning they were so tough they were beyond classification, known as Hors Categorie.

"It wasn't easy," Froome said. "The whole team worked very hard to keep the yellow jersey."

Contador was dropped by Froome on the second ascent of L'Alpe d'Huez and finished 11th. The two-time former champion just held on to second place overall, but 5:11 behind Froome.

Colombian climber Nairo Quintana moved up to third overall and 21 seconds behind Contador.

With about 4 miles to go on the last climb, Froome launched one of his trademark attacks. About a mile later, he attacked again and only Quintana could keep up with him as Contador dropped away.

But then Froome called for assistance with about 2 miles to go with what looked to be bike trouble. No team car could get up to help him because of fans in the way. So Porte gave him an energy bar.

"He's just a super person, to have ridden the way he did today," Froome said. "He's put aside all his ambitions today. He paced with through that whole climb."

Van Garderen and Riblon were part of a nine-man breakaway.

"This is a reward for me," Riblon said. "It's the fourth time I've been in a breakaway on this race."

They were chased by two riders from Contador's Saxo-Tinkoff team, Nicolas Roche and Sergio Paulinho, as they tried to increase the pressure on Froome's Sky teammates. Roche dropped off as they approached the first big ascent of the day.

Froome and Contador waited for the other one to show his hand. But neither did at first.

Van Garderen and Riblon reached the top of the next climb together, the Col de Sarenne, and braced themselves for a long and razor-thin descent.

In recent days, Froome had expressed concerns that the Sarenne descent, with its bumpy, pockmarked surface, was too dangerous. Riblon went off the road and, luckily for him, rolled onto a grass bank and not over the mountain.

"I have a lucky star over me," Riblon said.

Two days ago, Froome criticized Contador for riding too aggressively on a sharp descent to Gap, almost causing the Briton to crash. But Contador attacked Froome almost immediately down Sarenne, passing him on the outside like a Formula One driver.

Contador, joined by his teammate Roman Kreuziger, opened up a gap of about 20 seconds but lost that advantage after a few minutes. Contador's bad day was compounded when he had to change bikes.

Fans jammed the 21 hairpin bends on L'Alpe d'Huez in a chaotic atmosphere. Many were in fancy dress: Vicars, super heroes and other outfits of more dubious taste.

But there was still a degree of organization within the mayhem, with certain corners reserved for fans from certain countries.

One of those is known as "Dutch Corner" and several hundred screaming, shouting Dutch men and women formed a vortex that sucked the riders in amid a surreal cacophony of indecipherable shrieks, howls and wails.

Several dozen Norwegians, some in plastic Viking helmets, formed a human shield around one corner near the top. Elsewhere, a dozen or so Colombians marched uphill carrying a giant national flag.

Camping cars lined the hill, there were British Union Jack flags, Irish tricolors, Australian fans dressed in kangaroo suits and some dressed as inflatable giant flowers.

Occasionally, a distressed-looking police officer would blow a whistle, trying to stop fans from getting too close. One got too close to Riblon, who elbowed him in the chest, and a young boy ran in front of Froome, who just about avoided him.

Barricades were erected on the last part of the climb to give the riders some room.

Yul Moldauer raced out to an early lead at the 2017 U.S. Gymnastics championships, putting together six steady routines Thursday night to open up a sizable gap over reigning NCAA all-around champion Akash Modi and give him some serious momentum in his attempt to lock down a spot on the world championship team this fall.