The puncture came in the final kilometre of the stage from Saint-Paul-Trois-Chateaux for the UAE Team Emirates rider, hampering the Irishman’s chances of keeping up with the General Classification (GC) contenders as they crossed the line.
However, despite the bad luck, Martin retained his position in the top-10 overall, falling just one place to 10th as he came home 19′ 52” behind Spain’s Astana rider Fraile.
Crucially, despite his bad luck, he was still just under two minutes adrift of yellow jersey occupier Geraint Thomas, as well as Team Sky colleague Chris Froome and Team Sunweb’s Tom Dumoulin, who crossed the line together in 30th, 31st and 32nd places respectively.
Martin, who was 50th, is now 06′ 54” behind Thomas, but has a healthy near three minute gap to Movistar veteran Alejandro Valverde in 11th.
Fraile put in a late attack to take home his first ever Tour victory.
Martin said: “It was the worst moment possible (to get a puncture before the climb). Either side of the road there was a lot of gravel and we were riding on the side of the road, it was a risk and it happened, but there is nothing you can do.
“That’s just the way it is. It was a hard start and everybody knew it was going to go on to the smaller roads and no-one panicked. It was a really strange day.”
Sunday will see riders head for the Pyrenees and the last of the mountain stages as they tackle a 181.5km route from Millau to Carcassone.
Two early categorised climbs could test the peloton and anyone who is feeling the strain of the previous stages may find themselves fighting to stay in contention.
If those two climbs don’t split the peloton then the final one, the Pic de Nore – a 12.3km category one climb with an average gradient of 6.3 per cent – certainly could.
There will be a long descent before riders hit the flat finish in what may be a thrilling end to racing before Monday’s rest day.
Astana’s Fraile overhauled fellow escapee Jasper Stuyven – who had been away solo for 33 kilometres – on the steep climb up to the Mende aerodrome, making the catch two kilometres from the end of the 188km stage from Saint-Paul-Trois-Chateaux.
Trek-Segafredo’s Stuyven did his best to chase back with the help of Quick-Step Floors’ Julian Alaphilippe but ended up third behind the Frenchman as the final survivors of a 32-man breakaway contested stage honours more than 18 minutes ahead of the General Classification hopefuls.
The top three in the GC standings crossed the line together as Thomas followed home team-mate Chris Froome and Team Sunweb’s Tom Dumoulin, with the trio eight seconds behind LottoNL-Jumbo’s Primoz Roglic.
The Slovenian, fourth overall, attacked three kilometres from the finish to pick up a handful of seconds.
But others struggled, most notably AG2R La Mondiale’s Romain Bardet and Movistar pair Mikel Landa and Nairo Quintana.
Quintana gave up 10 seconds to Thomas, while Bardet was 14 seconds back and Landa 29.
There were further signs of the ill-feeling towards Team Sky and Froome in the finale, with several fans booing and gesturing towards the Sky riders, while Froome had what appeared to be a clear liquid thrown at him.
UAE Team Emirates’ Dan Martin was not with the main group after suffering a puncture one kilometre before the climb while Adam Yates’ recent struggles continued as he was dropped as soon as the road went up.
The provisionalGgeneral Classification showed Thomas retaining his lead of one minute 39 seconds over Froome, with Dumoulin a further 11 seconds back.
Roglic is now two minutes 38 seconds down in fourth, with Bardet’s deficit to yellow growing to three minutes and 21 seconds.
After going clear of the remnants of the breakaway 35km from home, Stuyven hit the final climb with over a minute and a half in hand, but could not hold off Fraile.
When Alaphilippe also bridged over, the pair briefly combined to try to chase down Fraile, but the Spaniard was too far ahead and had plenty of time to enjoy his first career Tour stage win.
Appeals for calm among Tour de France spectators appeared to fall on deaf ears as a lit flare was tossed into the peloton before world champion Peter Sagan claimed his third stage victory of the race in Valence.
Twenty-four hours after four-time winner Chris Froome was slapped and apparently spat at by elements within the massed crowds on Alpe d’Huez, there was fresh trouble when a spectator threw the flare around 16 and a half kilometres before the finish of the 169.5km stage from Bourg d’Oisans.
Spewing yellow smoke, the flare appeared to be thrown over Team Sky’s riders, massed on the right-hand side of the peloton around Geraint Thomas in the yellow jersey, before bouncing across the road without bringing down anyone.
“I didn’t actually notice it,” Thomas said. “Sixteen kilometres to go, did you say? I was fully in the zone then fighting for position. It was pretty stressful so I had no idea.”
The incident came only hours after Tour director Christian Prudhomme called for calm at the roadside after events spilled over on the Alpe d’Huez on Thursday.
Froome was slapped by at least one fan and appeared to be spat at by another, before Vincenzo Nibali crashed after touching a spectator, fracturing a vertebrae to put him out of the race.
“We need to restore calm and respect all the riders,” Prudhomme said.
“It was a very annoying climb of the Alpe d’Huez. The riders on the Tour, and champions of the Tour, must obviously be respected, as they are by the large majority of the public.
“By the roadside it was very calm for 10 days, with only a few anti-Froome or anti-Sky placards. But at a stroke, it all went up again.
“I can only renew my appeals for calm, for common sense, with regards to the riders who make up the Tour de France.”
Speaking before the start of Friday’s stage, Froome called for riders to get more protection.
“I think the organisers had tried to put in a few special precautions to stop those kind of things happening,” he said.
“When you’ve got fans touching and interfering with the riders, who are doing everything to try and get up the climb, that’s not a situation anyone wants to see. That’s not acceptable.
“I was pushed a few times but thankfully I stayed on my bike and didn’t get knocked off.
“(Appealing for calm) is a step in the right direction but I think there are more measures that can be taken, for sure.”
There had been fears about security on Alpe d’Huez with Froome still facing lingering ill-feeling among some cycling fans following the salbutamol case in which he was cleared of wrong-doing just days before the Tour began, while Sky have often faced a mixed reception in France due to their dominance of the Tour in recent years.
For a third straight day, Thomas heard some boos as he appeared on the podium to collect his yellow jersey in Valence.
Asked why, he said: “I think that’s a question for the people out there. I don’t know. We just train hard, work hard and come here to try to win the race. That’s a question for the people on the side of the road.”
The day’s stage came down to a sprint, though there were only a handful of real contenders after the Alps saw no fewer than five fast men eliminated from the race through missed time cuts or abandonments.
Bora-Hansgrohe’s Sagan picked up his third stage win of this Tour as he overhauled UAE Team Emirates’ Alexander Kristoff and Arnaud Demare of Groupama-FDJ in the final few metres to win by a wheel length.
“I think I left it a little bit late and I was a little bit behind in the final 600 metres,” Sagan said. “With the short climb I tried to bring myself to the front and stay on the wheel of Kristoff. I am very happy to beat them.”
The flare was the only thing that came close to upsetting a relatively quiet day for Thomas after the drama of his back-to-back mountain stage wins which thrust him into yellow.
“It wasn’t exactly a rest day but for sure it was a lot easier than the last three days,” he said. “It was nice to go on fast roads, the wind was kind to us and it was a good day to get ticked off. A welcome easier day for the whole peloton.”
With no change in the General Classification, Thomas leads Froome by one minute and 39 seconds, with Team Sunweb’s Tom Dumoulin a further 11 seconds back.