Costa took control of the day's race with a push up the Category 2 climb of Col de Manse and won his second career stage by a wide margin.
The true drama was about 11 minutes behind where Alberto Contador tried to narrow his overall margin with Froome on the ascent side of Col de Manse and kept the pressure on during the descent into Gap, France.
But Froome never let Contador get in a comfortable position. A final try by Contador to pull away resulted in his losing control of his bike on one of the hairpin turns. That also forced Froome off the road but both were able to keep pace with the group.
As a result, Froome kept his lead of 4 minutes, 14 seconds over Bauke Mollema and 4:25 ahead of Contador. Roman Kreuziger is fourth another 3 seconds back and Nairo Alexander Quintana Rojas has moved into fifth, 5:47 off Froome's pace.
Costa finished the 104.4-mile run from Vaison-la-Romaine to Gap in 3 hours, 52 minutes, 45 seconds. Four riders, led by Christophe Riblon, came in 42 seconds later.
Quintana Rojas, in 27th, guided the leaders' group, which included Froome, across 11:08 after Costa crossed.
The riders have an individual time trial Wednesday, traveling 19.9 miles in the Alps from Embrun to Chorges. The route includes two Category 2 climbs.
Exploding whale video goes viral on Internet
Couple mistakenly served bag of cash at McDonald's drive-thru