SC Paderborn completed a remarkable return to the Bundesliga next season despite a 3-1 defeat to Dynamo Dresden on Sunday.
Paderborn, who reached the Bundesliga for the first time in 2014-15, were relegated that season and again the following season to fall to the third tier. In 2016-17, they narrowly avoided a third relegation in three seasons (to the Regionalliga) despite finishing 18th, as 1860 Munich's administration error and failure to secure a licence to play saw them stay up.
Yet, incredibly, they finished second the next year to climb back up to 2.Bundesliga.
Knowing all they needed to do was beat or equal Union Berlin's result against Bochum to claim the second automatic place behind already-promoted FC Cologne, Paderborn went ahead in the 10th minute.
Germany under-20 midfielder Philipp Klement netted his 16th goal of the season, before Dynamo hit back quickly through Baris Atik.
Atik then scored again either side of half-time to complete his hat trick and seal the win, but Paderborn were promoted as Union drew 2-2 with 10-man Bochum.
Down 2-0, Union scored twice in the final 10 minutes but couldn't get a winner as they finished third in the league on goal difference (five behind Paderborn) and a point ahead of Hamburg in fourth. They will contest the relegation playoff against VfB Stuttgart.