Mario Gomez scored a hat-trick as Bayern Munich ensured they would be playing Champions League football next season following a romp at St Pauli which relegated the hosts from the Bundesliga.
Bayern were only 2-0 up at half-time with little sign of what was to come but a glut of goals in the second half, including doubles by Franck Ribery and Arjen Robben, saw Andries Jonker's side climb to within three points - and a far superior goal difference - of Bayer Leverkusen.
Bayern went ahead in the 10th minute when Gomez stole in and pounced on a mistake by Markus Thorandt who failed to get enough on a chest back to goalkeeper Thomas Kessler and the forward bundled the ball home.
Marcel Eger could not take advantage of being left unmarked at the back post for the hosts with Gomez also missing a great chance for Bayern.
However, shortly after the half-hour Bayern doubled their lead, Daniel van Buyten heading home Robben's corner.
Florian Bruns had a close-range shot blocked for St Pauli just after half-time but thereafter it was one-way traffic.
In the 52nd minute, Robben sent a ball through to Gomez whose pace outstripped Fabio Morena and he slid the ball home.
Robben himself stroked a left-footed shot home past Kessler two minutes later after a one-two with Thomas Muller.
Ribery gave Bayern a 5-0 lead in the 74th minute, pouncing on Kessler's parry from Gomez's shot before Eger headed home for the hosts.
There was still time for three goals in three minutes for Bayern.
Robben headed home Ribery's left-wing cross, Gomez completed his hat-trick from close range after being set up by Robben before Ribery concluded the scoring three minutes from time with a 20-yard shot into the right corner of the goal.