Stuttgart secured their Bundesliga status with a 3-1 victory at Hamburg (6-1 aggregate) in Monday's relegation playoff return leg, ensuring another season in the second division for the fallen giants.
Two second-half goals from French midfielder Enzo Millot and an injury time strike from DR Congo's Silas overturned a 1-0 halftime deficit, ensuring the 16th-placed Stuttgart remain in the top division next season.
The loss means Hamburg, who once celebrated the longest run in the top division with a clock marking every second the former Champions League winners had not been relegated, will now play a sixth season in Bundesliga 2.
Stuttgart manager Sebastian Hoeness, who has lost just one of 10 league matches since taking over in early April, lauded his team's "ability to handle pressure".
"Compliments to the team" Hoeness said of securing first division football next season "it sure didn't look like that eight or nine weeks ago."
His Hamburg counterpart Tim Walter, who coached Stuttgart for six months in 2019 before being sacked, lamented how close but how far his side was.
"We played a great season, 20 wins, but we were missing just one point.
"We're building something unbelievable here, I'm incredibly proud of my team, unfortunately the first division side were a little bit better."
Thrashed 3-0 in Thursday's first leg, Hamburg gave their suffering supporters hope early. A stunning long-range strike from Sonny Kittel just seven minutes in gave the home side the lead in front of an electric 57,000-strong home crowd.
Hamburg built and pushed in the hope of a second and breathed a sigh of relief after 16 minutes when a superb Serhou Guirassy backheeled goal was chalked off for offside.
Stuttgart struck early after half-time, the unmarked Millot firing in from close range.
Millot scored another midway through the second stanza, pouncing on a huge goalkeeping error from Daniel Heuer Fernandes, who miscued a punt on the edge of his box, allowing the Frenchman to tap in.
Hamburg pushed to turn the tie but Stuttgart scored again deep into injury time, attacker Silas adding a third to seal his side's place in next year's top division.
Hamburg, with six league titles and a European Cup victory 40 years ago, will play second division football for another season.
Under German football's playoff system, the 16th-placed team in the top division faces the third-placed team in the second division.
Since their relegation, Hamburg have finished fourth three times and third twice, losing last year's relegation playoff against Hertha Berlin.
Since the playoff system was re-instituted in the 2008-09 season, the second division team has won the playoff only on three of 15 occasions.