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 a break for the line, but Degenkolb covered his move before powering clear of the peloton to win by a couple of bike lengths.

Team Sky leader Froome moved up two places to 15th overall after finishing in the lead group.

Wednesday’s fifth stage is a 180km ride from Priego de Cordoba to Ronda.