ALPE D'HUEZ, France - Feeling like he was "dying a thousand deaths," Chris Froome started to think that a second Tour de France victory might be melting away like the patches of snow on surrounding Alpine peaks.

Up ahead, already out of sight on the 21 hairpin bends lined by frenzied spectators, Froome's biggest rival at this Tour and those to come, Nairo Quintana, was flying, out of his saddle, getting away.

Grimly, Froome clung on. Following the wheels of two teammates who led him up cycling's most iconic climb to the Alpe d'Huez ski station, he passed — barely — the last big test before the three-week race rolls to its finish in Paris on Sunday.

This wasn't the dominant Froome whose powerful performances in the Pyrenees seemed, to some skeptics, reminiscent of dope cheats who did so much damage to the Tour. This was just a man, fighting pain, fighting the mountain, fighting to survive.

"There was a moment where I felt this could go either way," the British rider said.

"I was on my absolute limits. I was dying a thousand deaths."

Quintana was outstanding on the storied ascent, piling on speed in his last real opportunity to unseat the race leader. Over his radio, Froome's Team Sky updated him on the Colombian's progress as he scythed through fans waving flares and smoke bombs.

"We were getting time checks every few minutes," Froome said. "It was comforting to see it wasn't suddenly jumping by 30 seconds each time. It was slowly moving up 5-10 seconds at a time."

Thibaut Pinot won Saturday's Stage 20, the third French victory of this Tour. Victoria's Ryder Hesjedal was third for the third time in his career, finsihing 41 seconds behind Pinot. The Canadian, who rides for Team Cannondale-Garmin, is 40th in the overall classification.

But it was Quintana's bold last assault and Froome's tenacious defence that provided the thrilling finale to a spectacular race.

The 1 minute, 12 seconds Froome preserved over Quintana will see him crowned the winner on the Champs-Elysees.

"An amazing, amazing feeling," he said.

Froome essentially won this Tour on the first big climbs in the Pyrenees in week two when, closely followed by teammate Richie Porte, he triumphed at the La Pierre-Saint-Martin ski station to give him a big time cushion. He picked that climb weeks earlier in training as the place to make his move.

That decisive blow carried Froome through those mountains and the hilly Massif Central region on the way to the Alps, and — with the exception of Quintana — resigned other contenders to fight for second and third.

Ultimately, Quintana left himself too much to do on the last of four days in the Alps. Just as in 2013, he'll finish runner-up again to Froome.

Quintana said time lost in the first week cost him dearly.

Still, he said: "Second at the Tour de France isn't half-bad."

Their engrossing, developing rivalry is box office for the sport after the ravages wrought by Lance Armstrong's era of systematic doping and lying.

At age 25, Quintana's future is ahead. He again will win the white jersey as the Tour's best young rider.

At 30, Froome can still add to his soon-to-be two Tour wins, and says he sees himself competing for at least another six or seven years.

But on this Tour's evidence, Quintana is getting closer to finding Froome's breaking point. In 2013, Froome won with a lead of 4 minutes, 20 seconds. This Tour wasn't so comfortable.

"Nairo pushed me all the way to the end, literally," Froome said. "We'll be back for the rematch."

On the Alpe d'Huez, Froome clung to the lifeline of his teammates Porte and Wouter Poels, who kept glancing behind to make sure their leader was still on their wheels.

"They saved it for me," Froome said.

Barring further loss of time on Sunday's largely ceremonial ride, which is very unlikely, Froome's winning margin will be the smallest since Carlos Sastre beat Cadel Evans by 58 seconds in 2008.

Quintana's Movistar teammate, Alejandro Valverde, will take third overall, 5:25 back.

Froome, his voice rough, said at his winner's press conference he's battled a cough and "been struggling" in the Alps.

Although unintended, those first signs of vulnerability shot holes in the idea that his dominant riding in the Pyrenees was somehow fishy. Such doubts reflected the climate of suspicion that prevails post-Armstrong, despite tighter drug testing.

Froome has defended himself against repeated questions about doping, and how he generates such power. He did so with calm and patience, insisting that cycling has moved on from the "Wild West" era of Tours won with doping.

But after a spectator threw urine at him on Stage 14, the mild-mannered Froome showed steel, blaming "very irresponsible" commentators for souring public opinion.

Some spectators spat at him — including, he said, on Saturday's final climb.

"There's been so much going on in the background," Froome said. "I've done nothing wrong. I've done nothing to deserve this."