Spain's Jesus Herrada produced a strong finish on the final climb to win stage 11 of the Vuelta a Espana.
The Cofidis rider, 33, was part of a breakaway which was pulled up the climb by Ineos Grenadiers' Filippo Ganna.
He was trying to tee up Geraint Thomas, but when Herrada attacked, the Ineos rider had no answer and finished fifth.
Thomas pulled back over five minutes on GC leader Sepp Kuss but said: "I'm just disappointed I couldn't finish it off. I had no real gas at the end."
Herada finished three seconds ahead of Groupama's young Frenchman Romain Gregoire, with Lotto Destiny's Andreas Kron third at the end of the 163.5km ride from Lerma to La Laguna Negra.
The contenders for the general classification finished together, nearly six minutes behind Herrada, after Remco Evenepoel's Soudal-Quick-Step team largely neutralised the final climb.
Thomas, whose difficult race so far was compounded by chain issues on the stage 10 time trial, may have missed out on winning the stage.
However, the 37-year-old has moved back within just over four minutes of the top 10, although he trails red jersey-wearer Kuss by seven minutes 34 seconds.
"We gave it everything and that's what we had on the day," the former Tour de France winner said.
Stage 11 results
1. Jesus Herrada (Spa/Cofidis) 3hrs 29mins 17secs
2. Romain Gregoire (Fra/Groupama-FDJ) +3secs
3. Andreas Kron (Den/Lotto-Dstny) +8secs
4. Jonathan Caicedo (Ecu/EF Education-EasyPost) +12secs
5. Geraint Thomas (GB/Ineos Grenadiers) +19secs
6. Pelayo Sanchez (Spa/Burgos-BH) +24secs
7. Rudy Molard (Fra/Groupama-FDJ) "
8. Nicolas Prodhomme (Fra/AG2R-Citroen Team) +27secs
9. Dorian Godon (Fra/AG2R-Citroen Team) +58secs
10. Filippo Ganna (Ita/Ineos Grenadiers) +1 min 16secs
General classification standings after stage 11
1. Sepp Kuss (Usa/Jumbo-Visma) 39hrs 27mins 45secs
2. Marc Soler (Spa/UAE Team Emirates) +26secs
3. Remco Evenepoel (Bel/Soudal-Quick-Step) +1min 09secs
4. Primoz Roglic (Slo/Jumbo-Visma) +1min 36secs
5. Lenny Martinez (Fra/Groupama-FDJ) +2mins 02secs
6. Joao Almeida (Por/UAE Team Emirates) +2mins 16secs
7. Jonas Vingegaard (Den/Jumbo-Visma) +2mins 22secs
8. Juan Ayuso (Spa/UAE Team Emirates) +2mins 25secs
9. Enric Mas (Spa/Movistar Team) +2mins 50secs
10. Aleksandr Vlasov (Bora-hansgrohe) +3mins 14secs
13. Hugh John Carthy (GB/EF Education-Easypost) +4mins 56secs
18. Geraint Thomas (GB/Ineos Grenadiers) +7mins 34secs