Ireland’s Dan Martin savoured his second career Tour de France victory as the Mur-de-Bretagne delivered a shake-up to the general classification battle.

UAE Team Emirates’ Martin did his own hopes of featuring in the fight for yellow no harm as he attacked from 1.2 kilometres out on the ‘Alpe d’Huez of Brittany’ and raced clear to take victory on stage six ahead of AG2R La Mondiale’s Pierre Latour.

“It’s great to get a win after so many second places since the last one,” said Martin, who has had four second places in the Tour since taking victory on stage nine to Bagneres-de-Bigorre in 2013.

“I was afraid of the crosswinds and maybe it was adrenalin, but the legs were there and it all worked out.

“There were a lot of contenders in that group so I was glad to hang on.”

Martin had to dig deep as Latour countered with 500 metres to go, but he had enough to beat the Frenchman at the end of a 181km stage from Brest which tackled the Mur twice.

The rest of the pack were scrapping for seconds just behind and, when the dust settled, Team Sky’s Geraint Thomas had moved up to second place overall, three seconds off BMC’s Greg Van Avermaet in yellow.

However, Chris Froome conceded five seconds on a number of rivals, including Mitchelton-Scott’s Adam Yates, BMC’s Richie Porte, plus Alejandro Valverde, Mikel Landa and Nairo Quintana of Movistar.

There were greater losses further back. AG2R La Mondiale’s Romain Bardet suffered a broken wheel on the short, sharp two-kilometre climb and had to grab team-mate Tony Gallopin’s bike before rolling home 31 seconds down.

Worse befell Team Sunweb’s Tom Dumouli who had a broken wheel of his own with six kilometres left. The Dutchman finished 53 seconds down and was then hit with a 20 second penalty for using his team car to try to draft back to the peloton.

Thomas had used quick thinking to nick a couple of seconds in the bonus sprint and stay on Van Avermaet’s case, though he could not quite manage the podium finish which would have put him in yellow.

“In the final I tried to play it a bit too late,” the Welshman said. “I knew it was quite a hard finish so I wanted to try and wait. By the time 200 metres was coming the time had gone.

“Valverde went so I knew I wasn’t going to beat him for third. I just stayed where I was and saved that one percent for another day.”

Should Froome find that the Giro d’Italia does catch up with him, as many expect, Sky could hardly wish for Thomas to be better positioned as it stands.

Yates sits in 13th place and Froome 14th overall, both 62 seconds down and one second ahead of Dumoulin, who dropped to 15th.

Martin’s win pushed him up to 21st, one minute 27 seconds down as he clawed back some of the 98 seconds conceded by Emirates on the stage three team time trial.

“People were asking me this morning, ‘Do you aim for the stage victory or to take time?’” Martin said. “If I win the stage, I take time.”

The 31-year-old began the Tour targeting the general classification after riding to an impressive sixth last year despite suffering two broken vertebrae in a stage nine crash.

Since then he has changed teams, leaving Quick-Step Floors to join Emirates. He admitted he initially struggled with the responsibility of an increased leadership role before coming good with a stage victory and fourth overall at the Criterium du Dauphine last month.

“In May I had a period of reflection about why I was making all these sacrifices,” he said. “Today it was in the back of my mind. My wife has had an important 28-week scan for our twins and it’s moments like that you miss, but moments like this make it almost worthwhile.”