Valenciennes survived a late fightback to claim a 3-2 win over Bastia and secure back-to-back Ligue 1 victories for the first time this season.
Mathieu Dossevi scored twice in the first half to put the strugglers in control and when Abdul Waris grabbed a third it looked as if it was all over.
But Romaric and Ilan netted for the visitors to set up a tense finish as VA held on.
Dossevi nearly had the hosts ahead in the early stages but his free-kick was punched clear by Bastia goalkeeper Mickael Landreau.
Tongo Doumbia then saw an effort deflected wide for a corner before Valenciennes took a 33rd-minute lead.
There was a scramble in the visitors penalty area and the ball eventually came free to David Ducourtioux who set up Dossevi to score from close range.
And just two minutes later, the 25-year-old had his second as Landreau's punched clearance fell to his feet and he once again had the simple task of firing home from inside the penalty area.
Bastia were shellshocked but they nearly clawed their way back into it before the break via Ryad Boudebouz's volley but Nicolas Penneteau was equal to it in the home goal.
Penneteau was called into action again after half-time as he saved from Djibril Cisse but nine minutes after the break it was 3-0.
Rudy Mater and Doumbia combined to release Waris who beat Sebastien Squillaci and slotted home.
The game looked over as a contest at that point but with 19 minutes remaining Bastia had a lifeline as Romaric latched onto a clearance and finished between Penneteau's legs.
The visitors had their tails up and almost had a second a minute later with Adama Ba seeing his shot come back off the post.
Ba did have a hand in Bastia's second as Ilan converted his left-wing cross with seven minutes to go but they could not find another as Valenciennes moved to within a point of safety.