Ireland's Dan Martin produced a stirring ride to take third on stage three of the Tour of Catalunya.

Great Britain's Adam Yates clinched victory in a thrilling conclusion.

The 179km stage from Sant Feliu de Guixols to Vallter 2000 at Setcases saw Yates (Mitchelton-Scott) emerge triumphant from a group of five riders battling on the summit finish after he overtook Martin (UAE Team Emirates) on the final corner.

Colombia's Egan Bernal (Team Sky) ended up second, with Martin third and Bernal's compatriots Nairo Quintana (Movistar) and Miguel Angel Lopez (Astana) fourth and fifth respectively.

Belgian Thomas De Gendt (Lotto-Soudal) retained first place in the general classification after finishing two minutes 21 seconds behind Yates.

De Gendt's overall lead is down to 27 seconds, with Yates up to second.

Bernal is another three seconds back in third, while Martin is 33 seconds off the lead in fourth, with Quintana 35 seconds adrift and Lopez a further four seconds back.

Chris Froome, who is competing in his first WorldTour race of the season and supporting team-mate Bernal, was part of a group that finished almost 27 minutes behind Yates on Wednesday, a day on from the four-time Tour de France winner being caught in a crash.

Stage 3 results: Sant Feliu De Guíxols to Vallter 2000/Setcases (Vall Camprodon)

Adam Yates (GBR) Mitchelton - Scott 5:02:18 2 Egan Bernal (COL)Team Sky " 3 Dan Martin (IRL) UAE Team Emirates " Nairo Quintana (COL) Movistar Team " 5 Miguel Ángel López (COL) Astana Pro Team +2

General classification: 1 Thomas De Gendt (Lotto Soudal) 13:28.29 2 A Yates (Mitchelton-Scott) 27'; 3 E Bernal (Team Sky) 30' 4 D Martin (UAE Team Emirates) at 33'; 5 N Quintana (Movistar Team) at 35' 6 M Angel Lopez (Astana Pro Team) at 39'.