Bayern’s rout on Saturday closes the gap on second-placed Bayer Leverkusen, who drew 1-1 at Hamburg, and means Bayern could now finish second when the season finishes next Saturday.
Bayern will need Leverkusen to lose at Freiburg next Saturday and pick up a win at home to VfB Stuttgart themselves, in order to claim second, with only the top two teams automatically qualifying for the Champions League.
Third place in the Bundesliga means entry to the Champions League play-off round, the final stage before the group phase.
“We concentrated from the start, we got an early goal and took our chances to make it 2-0,” said Bayern’s caretaker coach, Andries Jonker.
“You could see how quick our players were when they had the necessary space. We can now enjoy third place and maybe we can still finish a bit higher.”
Bayern striker Mario Gomez opened the scoring after 10 minutes for Bayern and then netted his second of the game with nearly an hour gone.
With St Pauli’s defence in tatters, Dutch winger Arjen Robben netted twice and set up Gomez for the simplest of tap-ins with time almost up to give the Germany star his 27th league goal of the season and 38th in all competitions.
Just before the final whistle, France winger Franck Ribery completed the rout with his second goal of the game.
A header by Marcel Eger on 78 minutes proved to be no more than a consolation goal for St Pauli as they faced their 20th defeat of the season.
Having only come up last season, the north German side will be back in the second Bundesliga as they suffered another relegation to go with their drops in 1978, 1991, 1997 and 2002.
While his team goes down, coach Holger Stanislawski is at least guaranteed top-flight football next season as he will take over as Hoffenheim coach.
“This is obviously a disappointing and depressing defeat,” said Stanislawski. “I’ll need a few days to get over this.”
Fourth-placed Hannover’s 2-1 loss at Stuttgart means Bayern cannot finish lower than third, while 2007 champions Stuttgart moved up to 11th.
Fresh from having been confirmed 2011 German league winners last Saturday, Borussia Dortmund suffered a 2-0 defeat at Werder Bremen, who are now assured of Bundesliga football next season.
Mainz will play Europa League football next season after their 3-1 win at Schalke 04, who were dumped out of the Champions League on Wednesday after a 4-1 defeat at Manchester United in the second leg of their semi-final.
Mainz cannot now finish lower than fifth.
At the bottom of the table, Borussia Mönchengladbach are on course to pull off one of the most remarkable escape acts after they beat Freiburg 2-0.
It was their third straight victory after previous wins over champions Dortmund and high-flying Hannover.
The win leaves them 16th and they are level with 2009 champions Wolfsburg, whose 2-1 defeat at home to Kaiserslautern has dragged them back into the relegation fight.
Eintracht Frankfurt’s 2-0 defeat at home to Cologne means they are set to be relegated next weekend. They must beat champions Dortmund at home next weekend and hope results go their way to be sure of survival.
A group of around 150 Eintracht fans invaded the pitch after the match, and were beaten back by hundreds of riot police using pepper spray and batons.
Frankfurt players had to flee into the changing rooms.
“The behaviour of the fans is just terrible,” admitted Frankfurt chairman Wilhelm Bender.
This is the second Saturday in succession that Frankfurt fans have allowed their emotions to boil over.
A group of 200 fans stoned the team’s bus after they were beaten 3-0 at Mainz last weekend and the club cancelled training on police advice early last week before resuming their preparations in secrecy.