Nice secured fourth place and a European spot with a deserved victory at Ajaccio.
Goals from Dario Cvitanich and Eric Bautheac were enough to secure a Europa League play-off place and left Ajaccio with just one win in their last 10 outings.
Albert Emon's men started the day with a slim possibility of relegation but they were thankful results elsewhere secured their Ligue 1 status for another year.
The hosts were the first to go close and almost took the lead on 10 minutes.
Johan Cavalli and Benjamin Andre combined to tee up Andy Delort but his effort grazed the base of the left post with David Ospina well beaten.
Delort continued to cause problems in the Nice defence and found the target again moments later but Ospina saved well on his line.
The visitors' first real opportunity arrived on the half-hour but Jeremy Pied's delivery was headed just wide of the of the left post by Fabrice Abriel.
Ajaccio offered an instant reply when Delort picked out Fousseni Diawara inside the area with a free-kick but his header was gathered by Ospina comfortably.
Nice appeared to benefit from the break and within five minutes of the restart they found themselves in front thanks to some poor defending.
Cvitanich got on the end of a loose Felipe Saad back-pass and tapped the ball beyond Guillermo Ochoa before rolling the ball into an empty net.
Nice almost doubled their lead within minutes but Bautheac's close-range effort was kept out by Ochoa's knee after Abriel had picked him out.
A second goal did come with 15 minutes left on the clock. Abriel and Timothee Kolodziejzcak combined before the latter found Bautheac who made no mistake with a confident left-footed finish.