LA MOLINA, Spain (AP) Daniel Martin of Ireland was the first up the mountain to win the third stage of the Tour of Catalonia and take the overall lead on Wednesday.
Martin, who won the weeklong Spanish event in 2013, beat Alberto Contador to the finish line of the 172.1-kilometer (106.9-mile) ride from Girona finishing at the La Molina summit in the Pyrenees Mountains in five hours, 27 seconds.
''The team gave me a lot of support. I really didn't expect to win, but it sure feels good,'' Martin said.
Contador moved to second in the general classification at six seconds behind Martin. Nairo Quintana is fifth at 19 seconds back, while fellow favorite Chris Froome is eighth at 22 seconds off the lead.
Overnight leader Nacer Bouhanni withdrew from the race midway through the stage due to illness after having won the first two stages on the flat.
After Froome's Sky team had set the pace to reduce the pack, the British rider attacked near the end of the final climb, only to be quickly caught by Contador.
Quintana was next to try a breakaway. Martin caught and passed him, staying in front of Contador to claim the win for his Etixx-QuickStep team.
Thursday's fourth stage stays in the mountains with a 172.2-kilometer (107-mile) ride from Baga to Porte Aine, where Martin won a stage in 2013 en route to the title.
''A good climb and a good memory,'' Martin said. ''Sure they will attack me a lot, but we have a good team and will do our best to keep the lead.''
Tom Dumoulin also withdrew midway through Wednesday's stage, which included four category-one climbs and low temperatures on the final snowy peak.
The race in northeastern Spain ends in Barcelona on Sunday.