Bordeaux have claimed France's final Europa League place after a 3-2 win at rivals Saint Etienne on the final day of the Ligue 1 season.
Saint Etienne, who needed to win to secure the coveted fifth-placed finish, made the perfect start and took the lead after 19 minutes.
Pierre-Emerick Aubameyang found Josua Guilavogui with a clever pass and the defensive midfielder struck his first goal since October with a powerful effort from 15 yards.
The game had turned on its head just 10 minutes later though, as two quick-fire Cheick Diabate headers gave Bordeaux a precious 2-1 lead.
Aubameyang levelled the scores four minutes into the second half with a bullet header following a whipped cross from Loic Perrin.
However, 22 minutes from time Diabate found Yoan Gouffran on the left side of the penalty area and the former French Under-21 international rifled home his 14th league goal of the season to secure the vital win.