(Adds quotes, details)
ALTO DE MONCALVILLO, Spain, Oct 28 (Reuters) - Slovenian Primoz Roglic pulled off a brilliant late attack to win stage eight of the Vuelta a Espana on Wednesday and eat into the overall lead of Richard Carapaz.
Defending champion Roglic fought out a fascinating duel with Carapaz inside the final kilometre of the 164km mountain stage from Logrono to Alto de Moncalvillo and came out on top, crossing the line 13 seconds ahead of the Ecuadorean to collect his second stage win of this year's race.
Roglic also earned 10 bonus seconds for the stage win to help his pursuit of Carapaz, who picked up six bonus seconds.
Carapaz retained the red jersey but his lead was cut to 13 seconds as Roglic climbed from fourth overall into second, knocking Hugh Carthy back to fourth, with Daniel Martin moving into third overall after also coming third in the stage.
Roglic, who is looking to make up for his penultimate day collapse at the Tour de France, won the first stage of the Vuelta but surrendered the leaders' red jersey on Sunday to Carapaz after losing time due to a mechanical problem.
He had been dealt a blow before the stage with the news that his Jumbo-Visma team mate Tom Dumoulin, co-leader before the race began, had pulled out due to fatigue.
Carapaz's Ineos Grenadiers team led the peloton for most of the race and the chasing group reined in the breakaway with around 10 kilometres to go as Roglic and Carapaz stepped up the pace on the final climb.
Carapaz briefly took charge but Roglic went all out and powered away.
"I did the last climb for the first time in my life, I didn't know it apart from the profile and it was a hard climb but also a good opportunity and if you want to win you have to go for it," Roglic told reporters.
"It was more going with the feeling than saying I would go. I always like to win, so if there is a small opportunity I will take it.
"It was super hard today and luckily I had the legs and I'm happy to win the stage."
The general classification leaders are set to take a back seat for the next two flat stages on Thursday and Friday which are more suited to sprinters, before renewing their battle on Saturday and Sunday in the mountains. (Reporting by Richard Martin, Editing by Ed Osmond)