MADRID -- Chris Froome paraded into Madrid to clinch his first Spanish Vuelta title and secure the elusive Tour de France-Vuelta double on Sunday, while Spanish agreat Alberto Contador celebrated the end of his remarkable career in front of his home crowd.

Froome had virtually secured victory with a solid performance in the difficult climb up the Alto de l'Angliru on Saturday, which marked the last competitive stage of the three-week race.

"It's just incredible," Froome said. "I'm still coming to terms with everything. It's been such an incredible journey."

Riders cruised to the finish in Sunday's 21st stage, with the leaders not challenging each other, as per cycling tradition.

Italian Matteo Trentin won the final sprint to clinch his fourth stage victory in this year's Vuelta.

Froome, who earlier this year clinched his fourth Tour de France title, had finished runner-up in La Vuelta three times, including last year.

The Team Sky rider became the third man to complete the Tour-Vuelta double in the same season, after Jacques Anquetil in 1963 and Bernard Hinault in 1978, when the Vuelta was still held in the spring before the Tour.

"Just the fact that nobody's ever won the Tour and then La Vuelta afterwards, it's incredible to be able to do it," said Froome, the first British rider to win the Vuelta. "It's just been an amazing few months and I want to thank everyone who has contributed to that. I've been fighting for this victory for six years and three years I've been standing on the second step so it's amazing to stand on the first step this time."

Froome won two Vuelta stages this year, finishing 2 minutes, 15 seconds in front of Italian Vincenzo Nibali of Team Bahrain-Merida, who won the Vuelta in 2010 and was runner-up in 2013.

Russian Ilnur Zakarin of Team Katusha Alpecin, secured the final podium spot, almost three minutes behind Froome.

Froome also won the points competition, while Astana Pro Team won the overall team event.

Contador, the three-time Vuelta winner, ended his career on a high note by winning Saturday's difficult 20th stage. He was loudly cheered by Spanish fans as he arrived to cross the finish line one last time.

The rest of the riders allowed him to break from the peloton and ride a few moments by himself as the fans applauded. After the race, Contador took a Spanish flag and went for one final parade lap.

"It was very special to get to lead all the riders into Madrid," Contador said. "It was an incredible finish. I dreamed about ending my career this way."

The 34-year-old Contador had been out of contention for the Vuelta title after losing several minutes in a poor performance in the second stage. He made up time later in the race, but not enough to make it to the podium and eventually finished fifth, more than three minutes off the lead.

Considered one of Spain's greatest riders, Contador also won the Tour de France twice and the Giro d'Italia twice. He was stripped of a third Tour victory for doping.

"It's a dream. I can't imagine a better goodbye than this," he said. "Now is the moment to stop. When I started as a professional, I said I wanted to finish at the top level. And I think that now is the perfect moment for this. In the last 15 years, I did everything with my heart."