Striker Robert Lewandowski scored his 29th Bundesliga goal this season in Bayern Munich's win over Cologne. Photo: @FCBayernEN via Twitter

BERLIN – Hamburg and Wolfsburg both lost on Saturday to take the Bundesliga battle to avoid relegation to the last day of the season next weekend.

Mainz meanwhile won 2-1 at Borussia Dortmund to ensure safety, while Schalke clinched runners-up spot behind Bayern Munich and a Champions League spot next season.

Hamburg were beaten 3-0 at seventh-placed Eintracht Frankfurt to stay second last, while Wolfsburg slid to a 4-1 defeat at Europa League hopefuls Leipzig.

Wolfsburg remain in the relegation playoff place, two points ahead of Hamburg and with a much better goal difference before the final matches next Saturday.

It is now looking grim for Hamburg, who will need to beat visiting Borussia Moenchengladbach to have any chance of survival, while Wolfsburg face already-relegated Cologne and effectively need a point to go into the playoff.

Bayern came from behind to win 3-1 at Cologne, Mario Gomez scored both goals as Stuttgart defeated fourth-placed Hoffenheim 2-0, and Hanover ensured safety with a 3-1 win over visiting Hertha Berlin.

Fourth-last Freiburg are still not out of danger after slipping to a 3-1 defeat at Moenchengladbach. Bayer Leverkusen stay fifth after a goalless draw at Werder Bremen.