Schalke came from behind to defeat St Pauli Hamburg 3-2 on Saturday in the penultimate round of the second division and secure promotion back to the Bundesliga.
The visitors needed a win to maintain their own faints hope of promotion and an Igor Matanovic double in the first 17 minutes put them in front.
But Simon Terodde scored a penalty immediately after the restart, levelled in 71 minutes and Rodrigo Zalazer fired the winner soon after.
Schalke endured a miserable relegation in the 2020/21 season as they struggled with financial difficulties but succeeded in bouncing back at the first attempt.
Werder Bremen, also relegated last season, will take a firm grip of the second automatic promotion spot should they win at relegated Aue on Sunday.
Former European champions SV Hamburg and Darmstadt look set for a final day long-distance battle to secure the play-off place.
St Pauli, who had Marcel Beifus and Matanovic red carded late on, now have only a theoretical chance of a top three finish.