SV Darmstadt 98 edged out St Pauli 1-0 on Sunday to win automatic promotion into the Bundesliga after a 33-year absence.
Dirk Schuster's side welcomed relegation-threatened St Pauli to Stadion am Bollenfalltor knowing that victory would see them book a return to the top flight.
Tobias Kempe's 30-yard free kick after 71 minutes proved enough as Darmstadt, who earned promotion from the third tier last season, secured a fairytale finish to the season.
They finished second behind Ingolstadt, while results elsewhere ensured that St Pauli, whose fate hung in the balance prior to kickoff, survived.