BERLIN (AP) — Bayern Munich's Robert Lewandowski left it to the last minute of the last game before breaking the Bundesliga record with his 41st goal of the season on Saturday.

Lewandowski missed a host of chances before he finally struck in the 90th minute of Bayern's 5-2 win over Augsburg in the final round of the German league.

“When you try and score at least a goal for 90 minutes and it doesn’t happen and you try everything, and then in the last second you score a goal, it’s crazy,” the Poland striker said. “I’d have preferred to have scored earlier, but it was exciting to the last second.”

Lewandowski had already equaled the previous best-mark of 40 goals scored by Bayern great Gerd Müller in the 1971-72 season. He scored in each of his last 10 league appearances, and clocked 41 goals in just 29 games altogether.

Bayern, which was already assured of a record-extending ninth consecutive German championship, finished on 78 points — 13 clear of runner-up Leipzig — after Hansi Flick’s last game as coach of the Bavarian powerhouse.

Also on the last day, Werder Bremen was relegated to the second division and Union Berlin qualified for Europe for the first time.

Bremen lost 4-2 at home to Borussia Mönchengladbach and was relegated automatically after Sebastiaan Bornauw scored a late winner for Cologne to beat already relegated Schalke 1-0.

Bremen finished 17th in the 18-team league, two points behind Cologne, which clinched a two-leg relegation/promotion playoff against the side that finishes third in the second division.

Max Kruse scored late for Union to beat Leipzig 2-1 to clinch seventh place and qualify for UEFA’s new Europa Conference League competition next season. Union needed a win to stay ahead of Gladbach.

LEWANDOWSKI PREVAILS

Lewandowski matched the now 75-year-old Müller’s record in the previous round when he got his 40th goal of the season last weekend in Freiburg.

But he had to wait for his 41st as it seemed everyone would score but him.

Lewandowski missed four good chances and watched as Augsburg defender Jeffrey Gouweleeuw scored an own-goal, Serge Gnabry made it 2-0, Joshua Kimmich struck from distance and Kingsley Coman made it 4-0 before the break.

The 32-year-old Lewandowski finally took his chance on the rebound, after compatriot Rafa Gikiewicz saved Leroy Sané’s effort, to become a focal point in Bayern’s title celebrations.

Bayern captain Manuel Neuer handed the Bundesliga “salad bowl” trophy to departing trio David Alaba, Jérôme Boateng and Javi Martinez to lift after their last game for the club.

BREMEN DOWN

Bremen fired Florian Kohfeldt last Sunday and reappointed Thomas Schaaf as coach in a last-ditch attempt to coax a reaction from the team, but Schaaf’s tenure got off to a terrible start with Lars Stindl putting Gladbach ahead in the third minute. And the visitors kept scoring.

Bremen’s troubles did nothing for Cologne, however, unless it got a goal.

Cologne's Sebastian Andersson wheeled away in celebration in the 71st, but his goal was ruled out through VAR for an apparent block by Salih Özcan in the buildup.

Bornauw finally made the breakthrough for Cologne in the 86th. This time the goal stood, lifting Cologne above Bremen in the table.

Arminia Bielefeld, the other team fighting relegation, secured survival with a 2-0 win at Stuttgart.

UNION’S NEW HEIGHTS

Union was merely targeting survival in just its second season in the Bundesliga.

Kruse’s late goal set off a party in Köpenick, where up to 2,000 supporters were allowed for the final game of the season due to falling coronavirus infection figures.

Justin Kluivert fired Leipzig ahead in the 55th, but Marvin Friedrich met Union captain Christopher Trimmel’s corner with a volley to equalize spectacularly in the 67th, and Kruse headed Union’s winner in injury time.

It was Leipzig coach Julian Nagelsmann’s last game before he takes over from Flick at Bayern next season.

DORTMUND THIRD

Erling Haaland scored twice and Marco Reus got the other goal for Borussia Dortmund to finish third with a 3-1 win over Bayer Leverkusen.

Lars Bender came on for his twin brother Sven — who previously played for Dortmund — and scored a late penalty in their last game before retirement.

It was also the last game for both coaches — Dortmund’s Edin Terzić and Leverkusen counterpart Hannes Wolf — as well as popular referee Manuel Gräfe, who is retiring due to an age limit. The 47-year-old Gräfe received Haaland’s jersey after the game.

Also, Hertha Berlin lost 2-1 at Hoffenheim and finished 14th, Wolfsburg ended fourth after a 3-2 loss at home to Mainz, and Eintracht Frankfurt finished in fifth place with a 3-1 win over Freiburg.

___

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports

___

Ciarán Fahey on Twitter: https://twitter.com/cfaheyAP