Andreaw Gravillon scored a dramatic 96th-minute winner as Lorient beat Dijon 3-2 in a relegation six-pointer.
The result lifted Lorient off the bottom of the table, above Nîmes on goal difference and now behind Dijon on goal difference alone, having ended the Burgundy club's unbeaten run at four matches.
Lorient were playing for the first time in 17 days following an outbreak of Covid within the camp. This was a massive match for both teams and Lorient went close to making the breakthrough (29') when captain Fabien Lemoine's shot was tipped around the post by Anthony Racioppi.
Christophe Pelissier's side didn't have to wait long to take the lead as two minutes later (31') midfielder Trevor Chalobah scored his first Ligue 1 Uber Eats goal. The England Under-21s international's low shot deflected off Mama Baldé and into the back of the net.
Dijon equalised (39') as neither Gravillon nor Chalobah were able to deal with Frédéric Sammaritano's free-kick. Sacha Boey surged onto it and crossed for Bruno Ecuele Manga, the former Lorient player, to equalise with a side-footed finish that went in off Gravillon.
David Linarès' side went in front (41') as Baldé beat Jérémy Morel to Sammaritano's low cross and the Guinea-Bissau forward finished for his sixth goal of the season. Lorient battled back and levelled (58') through Terem Moffi as the Nigerian provided a left-footed finish to a Jonathan Delaplace cross for his fifth league goal of the campaign.
Lorient's left-back Yoann Etienne was shown the red card on his Ligue 1 debut for a late challenge on Eric Junior Dina-Ebimbe (62'), though the decision was downgraded to a yellow card on a VAR review.
There was late drama as Gravillon (90+6') connected with a header from Enzo Le Fée's free-kick. Racioppi carried the ball over the line to gift the three points to the home side, who scored their first win since December 13.
THE PLAYER: Trevor Chalobah
On loan from Chelsea, the 21-year-old has shown his versatility since joining from the Premier League, using his 1m90 frame to good effect in defence and in midfield. He scored a first Ligue 1 Uber Eats goal and also picked up a late yellow card. Chalobah will be vital to Lorient's bid to retain their top-flight status.
THE STAT: 6
Lorient finally registered their first top flight win against Dijon at the sixth time of asking.