(CNN) -- Champions League finalists Bayern Munich and Borussia Dortmund rounded off their Bundesliga seasons in contrasting styles Saturday ahead of their May 25 showdown at Wembley.
Bayern came from two goals behind for a 4-3 win at Borussia Moenchengladbach while Dortmund surrendered a lead to lose 2-1 at home to Hoffenheim, who kept their hopes of avoiding the drop alive.
Bayern's 29th league win from 34 matches gave them a record tally of 91 points -- fully 25 points clear of Dortmund, who had been the reigning champions.
Veteran Bayern coach Jupp Heynckes was saying farewell to the Bundesliga after 1,011 games -- he will be replaced by Pep Guardiola next season -- and the match had an added poignancy because it was against one of his former sides.
They looked like spoiling his party as they led Bayern 3-1 inside the first 10 minutes, but Franck Ribery with a double, also setting up Arjen Robben for the second half winner, left Heynckes beaming.
"I had the feeling the team were still at last Saturday's party to celebrate the league title," he told their official website.
"But the team slowly got the game under control and we played like we're used to in the second half. I realized my team wanted to win for me."
Heynckes had fielded a full strength line-up tipped to start next Saturday's final but Austrian defender Martin Stranzl and striker Mike Hanke, on his farewell for Moenchengladbach, put the home side 2-0 ahead in the opening moments.
Javi Martinez pulled one back for the champions before Havard Nordtveit made it 3-1. Bayern had conceded only 15 goals in the entire Bundesliga season going into the final match.
Then came Ribery to the rescue with a fine strike on 18 minutes, an equalizer early in the second half and a cross for Robben to tap home the winner.
Dortmund's opponents Hoffenheim were fighting for their Bundesliga life and it looked bleak for the strugglers when Robert Lewandowski put the home side ahead after just six minutes -- the 24th of the league campaign for the Polish star.
Juergen Klopp's men should have added to their tally but with 13 minutes left Mats Hummels fouled Kevin Volland to concede a penalty and also limped off with a turned ankle, leaving him a possible doubt for next week's final.
Sejad Salihovic leveled from the spot and four minutes later had a second penalty opportunity after home keeper Roman Weidenfeller fouled Sven Schipplock and was sent off.
Salihovic netted the penalty and Hoffenheim held on to earn a relegation playoff against Kaiserslautern.
"We now draw a thick line under the Bundesliga season and see now if all the players are fit for the final," Klopp told AFP after the defeat.
Elsewhere, Schalke 04 earned a Champions League spot for next season with a 2-1 win at SC Freiburg, who will have to settle for a Europa League place.
Julian Draxler put Schalke ahead in the first half but Jonathan Schmid leveled for Freiburg just after the break.
An own goal from Julian Schuster saw Schalke ahead again and left Freiburg in fifth place in the final standings.
With Hoffenheim winning, Fortuna Dusseldorf were automatically relegated, losing 3-0 at Hanover.
Stefan Kiessling stayed ahead of Lewandowski as the Bundesliga top-scorer as he sealed third-placed Bayer Leverkusen's 1-0 win at Hamburg with a last minute goal -- his 25th of the campaign.