Bastia are on course for a top-10 finish after they saw off a disappointing Montpellier side at the Stade de la Mosson.
The Corsicans took the lead in first-half stoppage time following a counter-attack and a precise Ryad Boudebouz cross, which found Sambou Yatabare and the forward made no mistake in netting for the visitors.
M'Baye Niang wasted a good chance to equalise for the hosts when he sent his header wide midway through the second half.
Bastia's decisive second goal came 18 minutes from time when Wahbi Khazri unleashed a low shot that proved too good for keeper Geoffrey Jourdren.
The result leaves Bastia just a point behind eighth-placed Lorient going into the final game.