Martin, one second behind Froome overall before the stage started, broke away from Froome's yellow jersey group some 3 kilometers (2 miles) from the end.
Froome and others let him go, knowing that Martin is not a Tour contender.
The 30-year-old Martin, a three-time world time trial champion who finished second behind Rohan Dennis in the opening stage's time trial, finally got the yellow jersey he craves and fell into the arms of his teammates once they had joined him over the line. Countryman
With the time bonuses from his stage win, he leads Froome by 12 seconds and American rider Tejay Van Garderen by 25 seconds.
Defending Tour champion
But Froome, who crashed out of last year's Tour on the fifth stage after three falls in two days, held his nerve well.
He overcame one nervous moment when he almost lost control of his bike on the road, but having come through some stress-filled days of racing unscathed, his confidence is growing as he bids to win back the title he won in 2013. He leads
After Monday's dramatic spill, riders were hardly relishing taking on the cobbles dotted along the 223.5-kilometer (138.6-mile) trek from Seraing and to Cambrai, as the showcase race crossed the Meuse river in Belgium's Walloon region before swinging back into France.
Four riders broke away near the start of the stage: Frenchmen
The riders rolled over the first cobbles safely.
One down, six to go.
As the pack approached the next cobble section, the clouds started to thicken and darken, and the first of the dreaded rain drops began to fall. With the roads becoming more slippery, Dan Martin,
After losing time to Froome in stages 3 and 4, the Italian rider now had a chance to turn the tables on Froome, and his Astana teammates started to speed up at the front of the peloton heading into the second cobble section.
Fans packing the sides of the small and bumpy road shouted and cheered the riders on as the dust rose and the dirt caked rider's legs.
Nibali, Froome, Contador and Quintana all got over it safely, but others lagged behind and the main pack was split in two, while by now the front four riders had been caught.
Refusing to be intimidated by Nibali, Froome rode right next to him as they approached the third set of cobbles.
Flanked by teammate
Section 4 made little impact, except for a small hiccup for Norwegian rider
Approaching cobble section No. 5, Froome survived a scare when he went on the outside of Katusha rider Jacopo Guarnieri, who squeezed him for space. With his bike wobbling dangerously to the right, Froome steadied it just enough to prevent a fall.
Pushing hard from the front, Nibali was keeping the pressure on, but still had not gained any time on Froome after the fifth set of cobbles.
That left Nibali with two more cobble sections, to make a difference.
The sixth, 3.7 kilometers (2.3miles) from Fontaine-au-Tertre to Quievy, was the longest of the day.
The Tour contenders got through safely, but it cost French rider Thibaut Pinot valuable time after he sustained a puncture and waited for a tire change.