Bastia twice came from behind to complete a 4-3 win at Valenciennes that boosts the Corsicans' chances of staying in Ligue 1.
Remi Gomis briefly set Valenciennes on their way towards a first win in six outings but Toifilou Maoulida soon scored his first goal of a brace to level the tie.
A Gael Danic penalty sent VA into half-time with a 2-1 lead but Bastia came roaring back after the break, with Maoulida equalising before substitute Florian Thauvin settled the match with a double inside the last six minutes - his first goal coming from the spot.
Gregory Pujol squeezed in a third for the hosts in stoppage time but it was too little, too late for Daniel Sanchez's men, who remain in 12th place while both sides are eight points clear of the drop zone.
Bastia's 4-1 triumph over second-placed Lyon last time out may have come as a welcome surprise but Les Bleus were keen to prove they can dominate their mid-table rivals too.
That plan suffered an early setback as Gomis connected with Mathieu Dossevi's corner to beat Mickael Landreau in the ninth minute.
Eleven minutes later, though, Fethi Harek crossed from the left wing to find Maoulida, who controlled the ball before beating Nicolas Penneteau from close range.
Landreau was diving the wrong way in the 29th minute, too, as Danic converted a penalty obtained for a Maka Mary handball.
It took Bastia five minutes to level once again following the restart, Maoulida directing a header across the goalmouth and home from Julian Palmieri's pinpoint cross.
Anthony Modeste missed a gilt-edged chance to nudge Bastia ahead in the 58th minute but it would not matter as Thauvin took matters into his own hands late on.
The 20-year-old stepped up to beat Penneteau underneath his crossbar after VA defender Gaetan Bong handled in the box in the 84th minute.
Thauvin then stunned the Stade du Hainaut with a magnificent solo effort to make the points safe.
A 30-yard dribble saw the young midfielder beat two defenders to pick his spot beyond Penneteau and score his fourth goal in two matches.
Then, five minutes into time added on, Pujol volleyed Valenciennes' third low beyond Landreau following a shoddy clearance from Rudy Mater's corner.