Two goals in three second-half minutes from Foued Kadir and Mathieu Dossevi helped Valenciennes come from a goal down to beat Bastia and move up to fourth in Ligue 1.
The visitors survived an early onslaught from Bastia to take the lead through Kadir just after the half-hour mark, but Anthony Modeste drew them level from the penalty spot in the 39th minute.
Julian Palmieri then put the hosts ahead in the 61st minute but Kadir levelled for Valenciennes after 77 minutes before he teed up Dossevi to complete the comeback.
Tonight's victory was Valenciennes' third in four matches and sees them oust Lyon into fourth, although Les Gones have two games in hand.
It was Lyon who hammered Bastia 5-2 last week, although Frederic Hantz's men gained a measure of confidence with a Coupe de la Ligue victory over Auxerre in midweek.
They came firing out of the traps tonight, with Florian Thauvin first forcing a good save from Valenciennes keeper Nicolas Penneteau with a volley before his cross from the left picked out Wahbi Khazri, whose effort at the back post came back off the woodwork.
At the other end, Dossevi's effort from inside the area was tipped wide by Bastia keeper Macedo Novaes before the visitors took the lead with a stunning counter attack.
Forward Gregory Pujol led the charge and he freed Kadir, who fired past Novaes in the 31st minute.
They were pegged back eight minutes later, however, when Brazil defender Gil fouled Khazri in the area, with Modeste firing to his left to give Penneteau no chance.
And Bastia took the momentum from that goal into the second half, as Penneteau had to save well from Modeste before Palmieri finished with aplomb from Toifilou Maoulida's cross.
But they were then guilty of sitting back and allowing the visitors to go on the attack, with Novaes having to tip over Carlos Sanchez's vicious strike from the edge of the area.
Kadir then levelled proceedings by delightfully curling the ball into the top corner from just outside the area following some good work from Dossevi.
The two combined again for the winner in the 79th minute as Kadir's fantastic ball picked out Dossevi on the right of the penalty area, and his instant strike left Novaes with no chance.