Michael Matthews retained the overall lead of the Vuelta a Espana after coming in third on stage four behind Vincente Reynes and winner John Degenkolb.
Irish rider Dan Martin was fifth and moves up to 19th overall.
Degenkolb led the riders home on the 164.7 kilometre stage between Mairena del Alcor and Cordoba, unleashing a decisive sprint in the final 200 metres.
In energy-sapping heat several sprinters fell away earlier in the day, but Degenkolb was well protected by his Giant-Shimano team-mates, who moved to the front after the second of two big climbs with a kilometre to go.
IAM's Reynes made the break for the line but Degenkolb had enough to cover his move and won by a comfortable distance.
Orica-GreenEdge leader Matthews retains a slender general classification lead over Nairo Quintana, with the latter's Movistar team-mate Alejandro Valverde third.
Australian Matthews held off Canondale's Damiano Caruso and Garmin-Sharp's Martin at the finish.
Germany's Degenkolb was delighted with his success at one of his favourite events.
"I love the Vuelta a Espana and also the country. Yesterday was quite disappointing, it was too hard and too explosive. Today was better and I am very happy to have a stage of the Vuelta."
Team Sky leader Chris Froome moved up two places to 15th overall after finishing in the lead group.
Froome's Sky colleague Mikel Nieve, who helped close down an attempted break 9km from home to keep the peloton in touch, also finished in the bunch and lies 19th.