Dutch rider Annamiek van Vleuten won a third successive La Vuelta title, winning by just nine seconds from compatriot Demi Vollering.
Movistar’s 40-year-old Van Vleuten started the seventh and final stage with an 11-minute lead.
But Vollering of the SD Worx team almost took the overall victory by taking the final stage: a mountain finish at the summit of Lagos de Covadonga.
Van Vleuten was third, 56 seconds behind Vollering, but it was enough.
“I’m happy but exhausted,” said Van Vleuten, who is also the road world champion.
Italy’s Gaia Realini was second in the stage and finished third overall.
Van Vleuten had taken the overall lead from Vollering in controversial circumstances on Saturday as the 26-year-old took a bathroom break and was then caught in a crosswind.
“If it hadn’t been for that, I would have won this Vuelta,” said Vollering.
Claire Steels, who rides for Israel Premier Tech Roland, was the highest British rider in 18th place on Sunday, finishing 15th overall and 11min 44sec behind the winner.
This year’s version of the Spanish race was renamed La Vuelta Femenina, replacing the Challenge with La Vuelta, and expanded from five to seven stages.
Results of the seventh stage
1. Demi Vollering (Ned/Team SD Worx) 2 hours 43 minutes 02 seconds
2. Gaia Realini (Ita/Trek-Segafredo) +11s
3. Annemiek Van Vleuten (Ned/Movistar) +56s
4. Evita Muzic (De/FDJ-SUEZ) +1:59
5. Ricarda Bauernfeind (Ger/CANYON//SRAM Racing) +2:00
1. Annemiek van Vleuten (Ned/Movistar) 19 hours 00 minutes 11 seconds
2. Demi Vollering (Ned/Team SD Worx) +9 seconds
3. Gaia Realini (Ita/Trek-Segafredo) +2:41
4. Riejanne Markus (Ned/Team Jumbo-Visma) +3:36
5. Ricarda Bauernfiend (Ger/CANYON//SRAM Racing) +3:53
15. Claire Steels (GB/Israel-Premier Tech Roland) +11 minutes 44 seconds
27. Anna Henderson (GB/Team Jumbo-Visma) +25:52
35. Alice Towers (GB/CANYON//SRAM Racing) +31:41