Sebastien Roudet's late strike lifted Sochaux from the bottom of Ligue 1 as they secured a crucial 1-0 win over Nancy at the Stade Bonal.
The midfielder raced into the box with five minutes left on the clock and lobbed Nancy goalkeeper Guy N'Dy to claim Sochaux's eighth win of the campaign.
The result moves Sochaux out of the relegation zone after fellow strugglers Auxerre were beaten by Bordeaux while Dijon could only manage a draw against Lorient.
Nancy had the first chance of the game early in the first half when Djamel Bakar's shot was cleared only to bounce back to Loosemy Karaboue whose powerful volley struck the crossbar.
Nancy striker Benjamin Moukandjo fired over the bar with 10 minutes remaining in the half as both sides struggled to make the breakthrough.
Sochaux's only chance of the first period came in injury time when Ryad Boudebouz freed Sloan Privat on the edge of the box only for his low drive to be easily saved by N'Dy.
After the break, the home side had a succession of chances as they began to dominate.
Jerome Roussillon fired wide from 40 yards before Mathieu Peybernes headed the ball straight at N'Dy in the 53rd minute.
Cedric Bakambu's 30-yard rocket was then saved by the Nancy goalkeeper before Thierry Doubai's effort was also denied by N'Dy.
However, with the pressure building, it seemed inevitable that Sochaux would snatch a win, and Roudet ensured that when he pounced on a poor pass from Nancy midfielder Bakaye Traore to lob over N'dy to seal victory.