Naim Sliti and Julio Tavares scored in quick succession as Dijon overturned a half-time deficit to beat Toulouse 2-1 and move to 34 points.
Caen was left a point adrift after Younousse Sankhare earned Bordeaux a 1-0 victory on the north coast, meaning Dijon will take on Ligue 2 side Lens for a place in the top flight next season.
Lens forced its way into contention with three straight victories to finish fifth in the second tier, before winning a pair of knockout matches to earn the right to face Dijon.
Philippe Montanier's side saw off Troyes 2-1 after extra-time despite a first-half red card for goalkeeper Jean-Louis Leca.
Meanwhile, Amiens ensured their Ligue 1 safety by beating relegated Guingamp 2-1, and Monaco's survival was finally guaranteed mathematically.
A huge goal swing between Monaco and Caen would have been required to drag the 2016/2017 champion into a play-off, but defeat for its relegation rival allowed it to breathe easy despite losing 2-0 at Nice.