Mads Pedersen collected his second stage win of this year's Vuelta a Espana but there was plenty of drama in a frantic finish in Tomares.
Three-time reigning champion Primoz Roglic looked set to gain huge ground on leader Remco Evenepoel when he attacked in the final kilometres.
Quick-Step Alpha Vinyl Team positioned themselves at the front with 10km remaining of Tuesday's 188km flat stage from Sanlucar de Barrameda in Andalucia.
Yet it was Roglic's Jumbo-Visma who ended up better placed to launch an attack in the final sprint and that proved to be the case when the Slovenian opened up a gab with just under 3km remaining.
Pedersen and Pascal Ackermann followed hot on Roglic's tail while Evenepoel's frustration was compounded by a puncture, but there was more drama to come.
Danny van Poppel and Fred Wright had joined the lead group, and it was the latter who played a pivotal role in an incident that might well ensure Evenepoel wins his maiden Grand Tour title.
With just 100 metres remaining, Roglic made way for the powerful Pedersen and, as he moved back in, clipped Wright at the rear of the group, landing hard onto the road.
He was able to finish the race with the help of his team but looked in huge distress, with a nasty gash to his right knee. Evenepoel finished over three minutes further back. However, though there was initial confusion as to whether the 3km rule was in place, he ultimately lost only eight seconds to his rival.
Evenepoel, who has now led the race for 11 days, headed straight for Roglic at the finish line, and told reporters: "I heard that Primoz crashed, so I really hope he's okay and that he can continue the race.
"We all know that Primoz is explosive so a final like this is really made for him. That makes it even more of a pity for him that he crashed. You never want somebody to crash – I hope he's okay."
Evenepoel and Roglic benefited from the 3km rule, which is in place to ensure that if a rider suffers a fall, puncture or mechanical incident in the last 3km, they are credited with the same finishing time of the rider or riders they were with at the time of the incident.
Two up for Pedersen but Roglic's history hopes could be over
You can take nothing away from Pedersen, who admitted he was caught off guard by Roglic's brilliantly timed attack – one that would almost certainly have seen the Jumbo-Visma leader take the red jersey had it not been for that crash, which might have well dashed the 32-year-old's hopes of an unprecedented fourth successive Vuelta crown.
"It was a really smart move [from Roglic]. Everyone was really on the limit," Pedersen said. "I didn't hear it. I wanted to go to him here and I saw he was with destroyed clothing. It's a pity that he crashed. He hasn't been lucky this year. I hope it isn't too bad so he can continue competing for the victory of the Vuelta."
Points leader Pedersen is the first Trek-Segafredo rider to win two stages in the same edition of La Vuelta since Alberto Contador in 2017, and is the third competitor to win multiple stages at this year's race, after Sam Bennett and Richard Carapaz (both two).
STAGE RESULT
1. Mads Pedersen (Trek-Segafredo) 4:45:29
2. Pascal Ackermann (UAE Team Emirates) same time
3. Danny van Poppel (BORA-Hansgrohe) same time
4. Fred Wright (Bahrain Victorious) same time
5. Quentin Pacher (Groupama-FDJ) +0:08
CLASSIFICATION STANDINGS
General Classification
1. Remco Evenepoel (Quick-Step Alpha Vinyl) 61:26:26
2. Primoz Roglic (Jumbo-Visma) +1:26
3. Enric Mas (Movistar) +2:01
Points Classification
1. Mads Pedersen (Trek-Segafredo) 349
2. Fred Wright (Bahrain Victorious) 129
3. Primoz Roglic (Jumbo-Visma) 107
King of the Mountains
1. Jay Vine (Alpecin-Deceuninck) 59
2. Richard Carapaz (INEOS Greandiers) 30
3. Thymen Arensman (Team DSM) 22