Fabio Aru was dropped in the last 500 meters of Stage 14 of the Tour de France won by Michael Matthews and relinquished the yellow jersey to Chris Froome on Saturday.
Aru lost touch with the leaders in the final short, sharp ascent of the Cote de Saint Pierre in the town of Rodez and crossed the line 25 seconds behind Matthews.
It was unclear whether the Italy champion suffered a mechanical problem in the closing stages, or simply made a mistake by riding at the back.
Froome, who trailed Aru by six seconds at the start of the stage in Blagnac, was well positioned at the front and had no problem tackling the final climb. He finished hot on the heels of Matthews.
Kiwi rider George Bennett remains in 11th place on the general classification after finishing 22 seconds back in 25th place, right with former winner Alberto Contador who sits just ahead of him in the overall standings.
While the Team Sky train hit the front in the final kilometers, Aru was at the back and didn't attack before the peloton split in the climb.
"It's a beautiful surprise today," Froome said. He lost his jersey in the Pyrenees after enduring a bad day on the road to the ski station of Peyragudes.
"I need to say thank you to my teammates who rode at the front in the final 10 kilometers," he said. "In the final climb we made a big difference on other favorites. Every second counts at this Tour."
Froome enjoys an 18-second advantage over Aru, who is paying for the weakness of his Astana team, which lost key member Jakob Fuglsang on Friday after he broke a wrist and elbow.
French rider Romain Bardet, the runner-up to Froome last year, is 23 seconds back from the leader, in third place.
In fourth is Rigoberto Uran, who stuck with Froome on the final climb. He trails the Briton by 29 seconds overall.
Froome could hardly believe he won back so much time and recovered the yellow jersey on a stage that, on paper, didn't seem set up to pose such difficulties for Aru.
Froome said his teammates played an essential role in keeping him at the front, allowing him to pounce on the final climb while Aru was stuck.
In the last frenzied dash, Froome said teammate Michal Kwiatowski was urging him on over their radio system, yelling: "Froomey, go, go, go! There are gaps everywhere!"
Froome remained wary, because the top five were still very close. He said he'd always expected this Tour to be very open, with its atypical route over all five of France's mountain ranges, a prediction that is coming true, with just 29 seconds separating the top four.
"Everyone is fighting for every second they can get," Froome said. "The time I made up today could be very vital."
Matthews, who beat Olympic champion Greg Van Avermaet in the sprint to claim his second stage win at the Tour, said he'd targeted the stage win all year, and trained specifically for the last climb.
The Australian rider also eyed this stage when the Tour last visited Rodez in 2015. But he was riding injured that year, with four broken ribs. He said he planned to celebrate the stage victory with champagne.
It was the second consecutive win for the Sunweb team, after Warren Barguil's victory on Friday, Bastille Day.
Matthews described his emotions crossing the line as "disbelief."
He was so assured of victory that he sat up at the end and cruised over the line.
"I've been dreaming of winning like that since I started cycling," he said. "I could sit up and enjoy the win in the Tour de France."
Well before the frenetic finale, veteran French rider Thomas Voeckler launched hostilities on the outskirts of Toulouse.
Under a bright sunshine, Voeckler was joined at the front by four other riders who took advantage of the peloton's apathy.
The pack, however, kept the quintet on a leash as they rolled through the Aveyron province, keeping its deficit under 2 1/2 minutes.
With less than 100 kilometers left, the peloton passed Carmaux, the hometown of French Socialist leader Jean Jaures. But there was no sign of insurrection within the pack, with the Sunweb, Bahrain, and BMC teams riding at the front at a pedestrian pace.
But when the road began to climb, the leading group struggled to stay together. Thomas De Gendt went solo with 36.5 kilometers left but the Lotto rider lacked stamina and could not resist the peloton's chase on roads with constant ups and downs.