Nice moved into the top half of Ligue 1 after Dario Cvitanich's first-half penalty inspired them to a 1-0 win at struggling Sochaux.
Cvitanich netted from the spot to give the visitors a deserved lead on the stroke of half-time after Roy Contout was adjudged to have handled in the area.
Claude Puel's men had chances to put the game to bed after the break but their poor finishing did not come back to haunt them as they extended their unbeaten run to five matches and moved up to 10th in the process.
Sochaux, who occupy the final relegation place, suffered their first defeat in four encounters.
But they nearly opened the scoring in the first minute tonight when Contout swept through on goal after Mahamane Traore had lost possession near his own penalty area before forcing a fine save from Nice goalkeeper David Ospina.
Nice then went on the attack and Didier Digard's fierce effort from distance had to be blocked by Simon Pouplin, while Sochaux defender Banana Yaya was twice on hand to deflect two Camel Meriem volleys away from danger.
On-loan defender Valentin Eysseric saw his first-time strike turned away by Pouplin as Nice continued to be the aggressors.
And they were rewarded for their endeavour two minutes before the interval when they were awarded a penalty after Contout had handled a free-kick while defending in the wall.
Cvitanich made no mistake from 12 yards, sending Pouplin the wrong way.
The hosts responded at the start of the second half and Sebastien Corchia's cross from the right was fired over from close range by Sebastien Roudet.
That was the closest they would come to a leveller although Nice were in no mood to just sit back and protect their lead.
Meriem was a constant menace to the home defenders and he struck just wide of the right-hand post from Timothee Kolodziejczak's ball into the area, while Eric Bautheac showed great skill to dribble past two players on the left before his cross to the back post was volleyed off target by Esseyric.
Defender Nemanja Pejcinovic also headed wide, but it mattered little as Nice comfortably held on.