Two goals in four minutes saw Dijon consign Caen to relegation and take the play-off spot on the final day of the Ligue 1 season on Saturday morning (AEST).
Naim Sliti and Julio Tavares scored in quick succession as Dijon overturned a half-time deficit to beat Toulouse 2-1 and move onto 34 points.
Caen were 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 their 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-17 champions into a play-off, but defeat for their relegation rivals allowed them to breathe easy despite losing 2-0 at Nice.