Following two frenetic days of racing in the Pyrenees, no one would have bet a cent on a change of leadership on Saturday after Stage 14, a rolling 181.5-kilometre (113-mile) ride with no major difficulty.
But a short and steep climb to the finish in the southern town of Rodez was enough for Chris Froome and his mighty Sky team to recover the yellow jersey they lost two days before in the mountains.
The day's big loser was Fabio Aru, the Astana leader, who cracked in the last 500 meters and relinquished the coveted tunic to the three-time champion.
While the Team Sky train hit the front in the technical and twisting final kilometres at high speed, Aru was at the back and didn't come back before the peloton split in the climb. He lost touch with the leaders in the sharp ascent of the Cote de Saint Pierre and crossed the line 25 seconds behind stage winner Michael Matthews.
Froome was well positioned and had no problem tackling the final climb. He finished hot on the heels of Matthews.
"It's a beautiful surprise today," said Froome, who lost his jersey after enduring a bad day on the road to the ski station of Peyragudes.
Froome said he had no explanation for Aru's breakdown. But Astana team director Dmitryi Fofonov said the Italian climber simply paid for his efforts in the previous days.
"He was on his own, isolated," Fofonov said. "We had crosswinds the whole day, we needed to be up front all the time to avoid the splits. Then the finish was explosive, with sprinters climbing very fast. Not Fabio's favorite ground. Today we lost a battle, but not the war."
Froome, who had a six-second deficit at the start of the stage, is enjoying an 18-second advantage over Aru, who is paying for the weakness of his Astana team. The Kazakhstan-funded team lost key member Jakob Fuglsang on Friday after he broke a wrist and elbow, and Aru had not enough teammates to help him stay at the front.
French rider Romain Bardet, the runner-up to Froome last year, limited his losses to five seconds. He 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 on a stage that, on paper, didn't seem set up to pose such difficulties for Aru. He thanked his teammates for their 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 close to each other. 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."
Froome has never faced such a close battle at this stage of the race. In the three Tours he won, he had the race all but wrapped up at this point. He had a lead of 1:47 after Stage 14 in 2016, of 3:10 in 2015 and 2:28 in 2013.
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.
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."
It was the second consecutive win for the Sunweb team, after Warren Barguil's victory on Friday, Bastille Day.
The stage on Sunday will lead the peloton to Le Puy-en-Velay in Massif Central during a spectacular 189.5-kilometer (118-mile) ride on rolling terrain with four climbs that could offer more surprises. But Sky promised they won't be caught off guard.
Froome's teammate, Luke Rowe, said the British squad riders were "very disappointed" when the team leader relinquished the yellow jersey to Aru in the Pyrenees, having worn it for seven days.
"He won't do it again," Rowe said.