Matteo Trentin sprinted to victory in Madrid on the final stage of the 2017 Vuelta a España as Team Sky's Chris Froome secured the overall win.
Lorenzo Manzin (FDJ) was second and Søren Kragh Andersen (Team Sunweb) third in the sprint as Trentin narrowly failed to win the points classification at the last opportunity, despite winning his fourth stage of the race.
Trentin had earlier taken the day's intermediate sprint but Froome denied him by finishing 11th on final stage - thus claiming the red, green and white jerseys overall.
Froome’s main objective - his first-ever Vuelta title, and a phenomenal Tour de France/Vuelta double in 2017 - was of course achieved, and he becomes a five-time Grand Tour winner with four Tours de France already to his name.
Vincenzo Nibali (Team Bahrain Merida) finished second in GC, +2'15" down, with Ilnur Zakarin (Team Katusha Alpecin) third, 2'51" back. David Villella (Cannondale-Drapac) secured the King of the Mountains jersey.
A processional and celebratory first part of the final stage saw Froome and Team Sky enjoy a bottle of beer, before Froome, Alberto Contador (Trek-Segafredo) and others cracked open some bubbly.
Froome accepted a cup of coffee from a Bahrain Merida rider, and as the race rolled slowly into Madrid, retiring hero Contador (who won Stage 20 on Saturday) moved ahead of the peloton and waved to fans at the roadside.
The real racing then began, with the points classification still up for grabs, and Froome was clearly in no mood to gift the green jersey to Trentin, his Quick-Step Floors rival.
Both teams raced to set up the intermediate sprint, which Trentin won, keeping his hopes alive of claiming the prize.
A three-man break of Rui Costa (UAE Team Emirates), Nick Schultz (Caja-Rural - Seguros RGA) and Alessandro de Marchi (BMC Racing Team) then broke away but there never seemed any hope of a successful escape.
It all came back together and Trentin comfortably won the sprint after another impressive lead-out effort from his Quick-Step Floors team-mates.
Froome's 11th place on the stage secured him no fewer than three jerseys: red (GC), green (points) and white (combined) - and Team Sky's celebrations could begin.
Top 10 - Stage 21
1 Matteo Trentin (Quick-Step Floors) 3h 06'29"
2 Lorenzo Manzin (FDJ)
3 Søren Kragh Andersen (Team Sunweb)
4 Tom Van Asbroeck (Cannondale-Drapac)
5 Ivan Garcia (Bahrain-Merida)
6 Magnus Cort Nielsen (ORICA-SCOTT)
7 Kenneth Vanbilsen (Cofidis, Solutions Credits)
8 Sacha Modolo (UAE Team Emirates)
9 Michael Schwarzmann (Bora-Hansgrohe)
10 Daniel Hoelgaard (FDJ) (all same time)
Top 10 GC - final standings
1 Christopher Froome (Team Sky) 82h 30'02"
2 Vincenzo Nibali (Bahrain-Merida) +2'15"
3 Ilnur Zakarin (Katusha-Alpecin) +2'51"
4 Wilco Kelderman (Team Sunweb) +3'15"
5 Alberto Contador Velasco (Trek-Segafredo) +3'18"
6 Wout Poels (Team Sky) +6'59"
7 Michael Woods (Cannondale-Drapac) +8'27"
8 Miguel Angel Lopez (Astana Pro Team) +9'13"
9 Steven Kruijswijk (Team LottoNL-Jumbo) +11'18"
10 Tejay van Garderen (BMC Racing Team) +15'50"
Points classification: Top 10
1 Christopher Froome (Team Sky) 158pts
2 Matteo Trentin (Quick-Step Floors) 156
3 Vincenzo Nibali (Bahrain-Merida) 128
4 Alberto Contador Velasco (Trek-Segafredo) 105
5 Wilco Kelderman (Team Sunweb) 97
6 Ilnur Zakarin (Katusha-Alpecin) 93
7 Miguel Angel Lopez (Astana Pro Team) 90
8 Jose Joaquin Rojas Gil (Movistar Team) 70
9 Michael Woods (Cannondale-Drapac) 61
10 Johan Esteban Chaves Rubio (ORICA-SCOTT) 61
Mountains classification: Top 10
1 Davide Villella (Cannondale-Drapac) 67 pts
2 Miguel Angel Lopez (Astana Pro Team) 47
3 Christopher Froome (Team Sky) 35
4 Jose Joaquin Rojas Gil (Movistar Team) 33
5 Thomas De Gendt (Lotto Soudal) 30
6 Tomasz Marczynski (Lotto Soudal) 28
7 Rafal Majka (Bora-Hansgrohe) 28
8 Stefan Denifl (Aqua Blue Sport) 28
9 Alberto Contador Velasco (Trek-Segafredo) 27
10 Romain Bardet (AG2R La Mondiale) 25