Werder Bremen produced a stunning performance to avoid automatic relegation from the Bundesliga with a 6-1 home triumph over Cologne.
Fortuna Dusseldorf suffered the drop instead after they lost 3-0 at Union Berlin on Saturday.
After finishing 16th, Werder will now play a two-legged relegation playoff against a team from 2. Bundesliga, most likely to be either Heidenheim or Hamburg.
Consecutive defeats to Bayern Munich and Mainz had Werder on the brink of being relegated for the first time since 1981.
They came into the final day of the regular season two points adrift of Dusseldorf with an inferior goal difference.
But after selecting an attacking line-up, Florian Kohfeldt was rewarded as his side raced into a three-goal lead inside the first half-hour thanks to strikes from Yuya Osako, Milot Rashica and Niclas Fullkrug.
There was a positive half-time update from the Dusseldorf game, with hosts Union holding a one-goal advantage courtesy of Anthony Ujah.
After the break, Davy Klaassen scored and Osako added a second as Werder moved five goals in front, while the good news kept coming with a second Union goal from Christian Gentner in the other game.
Dominick Drexler scored for Cologne but rampant Werder made it six through substitute Josh Sargent.
With no revival against Union, who added a third thanks to Suleiman Abdullahi, it meant Dusseldorf's second season in the Bundesliga ended in relegation.
They will drop a division with bottom-of-the-table Paderborn, who were relegated on June 16 after also suffering a defeat against Union.