Bayern Munich came from two goals down to seal a 4-3 win at Borussia Moenchengladbach, while their Champions League opponents, Borussia Dortmund, lost 2-1 at home to Hoffenheim on the final day of the Bundesliga on Saturday.
Champions Bayern dug deep for their 29th league victory in 34 matches as Franck Ribery scored twice, then set up Arjen Robben for the winner after 'Gladbach had scored three goals in the opening 10 minutes.
Fielding the side likely to start the Champions League final at Wembley next Saturday, and despite previously conceding only four goals away all season, Bayern leaked three goals in the first action-packed 10 minutes.
Borussia raced into the lead as Austrian defender Martin Stranzl headed home, then 66 seconds later, striker Mike Hanke, on his last appearance for Borussia, added 'Gladbach's second after a mistake by Bayern centre-back Dante.
Munich's Javi Martinez pulled one back when he converted Ribery's pass on seven minutes, but Bayern went 3-1 down when Norway's Havard Nordtveit rolled his shot past Munich goalkeeper Manuel Neuer.
With Bayern coach Jupp Heynckes, on his 1,011th -- and final -- Bundesliga match before stepping down, fuming on the sidelines at his side's indisciplined display, Ribery pulled a second back with a crisp shot on 18 minutes.
He then saved Bayern's blushes to equalise on 53 minutes, before his cross found Robben at the far post which the Dutch wing tapped home to give Bayern the lead for the first time just before the hour mark.
Hoffenheim now face a promotion/relegation play-off against second division Kaiserslautern to stay in the Bundesliga after they stunned Dortmund as wing Sejad Salihovic netted two penalties in the last 13 minutes to leave them 16th.
Borussia captain and goalkeeper Roman Weidenfeller was sent off on 81 minutes for the foul which led to the second spot-kick.
Despite a string of chances to add to Robert Lewandowski's first-half goal, Dortmund conceded an equaliser when centre-back Mats Hummels fouled Hoffenheim's Kevin Volland in the area, conceded the penalty then limped out of the game.
Salihovic netted the spot kick on 77 minutes, then Weidenfeller fouled Sven Schipplock and was sent off four minutes later, but as Dortmund had made three substitutions, wing Kevin Grosskreutz had to step in as emergency 'keeper.
Salihovic netted his second spot kick to Hoffenheim's delight and although Dortmund had the ball in the net from Marcel Schmelzer's shot in added time, the referee ruled the goal offside.
Schalke 04 secured their Champions League play-off place with a 2-1 win at Freiburg as an own-goal by Julian Schuster for the guests secured the Royal Blues' win.
Freiburg will be joined in the Europa League next season by Eintracht Frankfurt, who finished sixth after they drew 2-2 at at home to 10-man VfL Wolfsburg, who had Japan defender Makoto Hasebe sent off.
Hasebe brought down compatriot Takashi Inui on 36 minutes and was shown a straight red.
South Korea's Ji Dong-Won guaranteed Augsburg's Bundesliga place next season with his side's final goal in their 3-1 win at home to relegated Greuther Fuerth.
Fortuna Dusseldorf, who lost 3-0 at Hanover thanks to Mame Diouf and Didier Ya Konan's goals, are relegated alongside Fuerth.
Stefan Kiessling finished as the Bundesliga top-scorer with 25 goals as he sealed third-placed Bayer Leverkusen's 1-0 win at Hamburg with the 90th-minute winner.