Djamel Bakar's first-half strike raised Nancy's hopes of beating the drop from Ligue 1 as they overcame Nice at the Stade Marcel Picot.
Nancy remain well adrift of safety, five points behind fourth-bottom Brest, but they have four wins in their last eight league outings.
A third straight defeat away from home for injury-hit Nice meant the visitors missed an opportunity to move level on points with third-placed Marseille.
Nice almost found themselves behind within the first minute after a defensive slip by Kevin Gomis allowed Florent Zitte in but goalkeeper David Ospina did well to keep out the young striker's effort.
That proved a warning of what was to come and the hosts took the lead in the 23rd minute.
Lossemy Karaboue delivered from the right and Bakar, despite seeing his first effort well saved by Ospina, followed up to open the scoring.
Nancy continued to push Nice back and the crowd were on their feet appealing for a penalty just after the half-hour mark, but referee Ruddy Buquet showed no sign of flinching when Benjamin Moukandjo went down under a Renato Civelli challenge.
Ospina was called into action again just before the break and did superbly well to prevent Nancy doubling their lead.
Thomas Mangani picked out Jordan Loties at the near post from a corner but his header was pushed away with both hands by the Mexican shot-stopper.
Half-time did nothing to stem the Nancy tide and Mangani went close to doubling the hosts' lead, but his header from Yassine Jebbour's cross ended up just wide of the post before Moukandjo fired a spectacular volley over Ospina's bar.
With more than an hour played Nice had their first real opportunity of the game when Alexy Bosetti fired in a dangerous volley from the edge of the area but Damien Gregorini was thankful to see the ball end up just the other side of his right post.
Tensions rose as Nancy's nerves began to jangle and Loties went into the book along with Nice's Eric Bautheac and Timothee Kolodziejczak after a melee broke out with a little over 10 minutes to play.
Nice applied some late pressure and Bosetti showed good skill to force a decent block from Gregorini but Nancy held on for a vital win despite having a late Mangani effort ruled out for a debatable offside.