Midway through the second half at the Stadion am Bollenfalltor, Darmstadt was as low as fourth in the standings and not even on course for a play-off berth.
However, a Tobias Kempe goal in the 71st minute of its game against St Pauli earned it the win it needed to march straight through the second division in its first season since promotion from the third tier.
Karlsruher has the chance to join it in the top flight having clinched third place and a play-off clash with Hamburg thanks to a 2-0 win over 1860 Munich, which goes into a play-off to avoid relegation.
Kaiserslautern missed the opportunity to earn a play-off when it was held by the champion Ingolstadt.
Meanwhile, Erzgebirge Aue and Aalen were both relegated on the final day of the season with St Pauli and Greuther Furth only just surviving.
Freiburg and Paderborn were relegated from the Bundesliga on Saturday while Duisburg and Arminia Bielefeld both earned promotion from the third division.