Metz have made an immediate return to Ligue 1, with Le Havre falling one goal short of moving into the promotion places on the final day of the season.
Metz held a three-point lead and a superior goal difference by six over Le Havre in the Ligue 2 table heading into the final round of fixtures on Friday.
However, they suffered a 1-0 defeat to Lens at the Stade Felix Bolaert, opening the door for Bob Bradley's team to snatch the final promotion place.
Le Havre were 1-0 up against Bourg-en-Bresse, but a second yellow card for Alliou Dembele in the 35th minute boosted their chances of achieving the big scoreline required.
Bradley's side took a 5-0 lead in the 83rd minute to draw level on goal difference with Metz, but they were unable to add to their tally.
Metz held onto third position by virtue of having scored two more goals than Le Havre's 52 across the whole season, earning a return to Ligue 1.
"It is a very difficult night, but it will help us start next season stronger," said Bradley.
Nancy had already been confirmed as Ligue 2 champions before the final round of fixtures, while Dijon finished in second position.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.