Pierre-Emerick Aubameyang scored twice in Borussia Dortmund's 4-3 win over Werder Bremen on Saturday to finish as the Bundesliga's top-scorer and seal his side's direct Champions League place on a dramatic final day of the season.
Aubameyang finished with 31 goals, one more than Bayern Munich's Robert Lewandowski, who failed to score in the champions' 4-1 home win over Freiburg.
There was drama at the bottom of the table as Hamburg guaranteed their survival with an 88th-minute goal to seal a 2-1 win over Wolfsburg.
Two minutes after coming on, Luca Waldschmidt's header, the day after his 21st birthday, sealed Hamburg's win which lifted them to 14th and dropped Wolfsburg to 16th.
With Darmstadt and Ingolstadt already relegated, the 2009 German champions, now face a two-legged relegation play-off to stay up.
In Munich, Bayern were handed the Bundesliga trophy for the fifth season in a row, extending the record for most wins, and finished with a 15-point margin.
Bayern farewelled Philipp Lahm and Xabi Alonso, both World Cup winners, who are retiring after glorious careers.
It was the eighth time Lahm has won the Bundesliga, his fifth as captain, putting him equal with Bayern legends Oliver Kahn, Bastian Schweinsteiger and Mehmet Scholl.
Arjen Robben got the party started in Munich by giving the hosts the lead after just four minutes when he slotted home Alonso's superb diagonal pass.
Bayern doubled their lead when Arturo Vidal's curling shot beat the Freiburg goalkeeper on 73 minutes.
Ex-Bayern striker Nils Petersen came on to claim Freiburg's consolation on 76 minutes and set a new record of 19 Bundesliga goals off the bench.
Franck Ribery and Joshua Kimmich scored injury-time goals to seal Bayern's win.
There was drama in Dortmund's seven-goal thriller as Marco Reus and Aubameyang both converted second-half penalties to seal Borussia's comeback win.
Dortmund defender Marc Bartra made his first appearance since fracturing his right wrist in the April 11 bomb attack on the Borussia team bus.
Werder took the lead when Zlatko Junuzovic stabbed home from close range, but Reus equalised with half an hour gone.
Aubameyang scored his 30th league goal -- arguably his best this season -- with a superb volley from a deft chip to Ousmane Dembele over the Bremen defence on 42 minutes.
However, less than a minute into the second half, Fin Bartels slammed home after a great run from Max Kruse to make the score 2-2.
Despite his midweek snub for the Confederations Cup, Kruse showed Germany coach Joachim Loew what he is missing by chipping home Bremen's third goal on 68 minutes.
But Reus slotted home a 75th-minute penalty to equalise before Aubameyang drilled home Dortmund's second spot kick to take the Golden Cannon as the Bundesliga's top scorer.
The win means Dortmund finish third while Hoffenheim, who were held to a goalless draw at home to Augsburg, end up fourth to secure a Champions League play-off place.
Second-placed RB Leipzig finished their first season in Germany's top-flight with a 2-2 draw against Eintracht Frankfurt with goals by Marcel Sabitzer and Yussuf Poulsen.
Emil Forsberg set up Poulsen for RB's second to claim his 22nd assist of the season.
It broke Kevin de Bruyne's record of 21 set in the 2014/15 season at Wolfsburg before he left to join Manchester City.RESULTS:FC Ingolstadt 04 1 Pascal Gross 41(pen) Schalke 04 1 Donis Avdijaj 2Bayern Munich 4 Arjen Robben 4, Arturo Vidal 73, Franck Ribery 90+1, Joshua Kimmich 90+4 Freiburg 1 Nils Petersen 76Borussia Moenchengladbach 2 Thorgan Hazard 50, Raffael 65 SV Darmstadt 98 2 Sven Schipplock 62, Marcel Heller 90Hertha Berlin 2 Weiser 71, Allagui 86(pen) Leverkusen 6 Hernandez 5, Havertz 31,45+1, Kiessling 64(pen), Aranguiz 81(pen), Pohjanpalo 90Cologne 2 Jonas Hector 43, Yuya Osako 87 Mainz 0Hamburg SV 2 Filip Kostic 32, Luca Waldschmidt 88 VfL Wolfsburg 1 Robin Knoche 23Borussia Dortmund 4 Reus 32,75(pen), Aubameyang 42,89(pen) Werder Bremen 3 Junuzovic 7, Bartels 46, Max Kruse 68Hoffenheim 0 FC Augsburg 0Eintracht Frankfurt 2 Jesus Vallejo 83, Danny Blum 90 RB Leipzig 2 Marcel Sabitzer 25, Yussuf Poulsen 56Standings P W D L F A PtsC1 Bayern Munich 34 25 7 2 89 22 822 RB Leipzig 34 20 7 7 66 39 673 Borussia Dortmund 34 18 10 6 72 40 644 Hoffenheim 34 16 14 4 64 37 625 Cologne 34 12 13 9 51 42 496 Hertha Berlin 34 15 4 15 43 47 497 Freiburg 34 14 6 14 42 60 488 Werder Bremen 34 13 6 15 61 64 459 Borussia Moenchengladbach 34 12 9 13 45 49 4510 Schalke 04 34 11 10 13 45 40 4311 Eintracht Frankfurt 34 11 9 14 36 43 4212 Bayer Leverkusen 34 11 8 15 53 55 4113 FC Augsburg 34 9 11 14 35 51 3814 Hamburg SV 34 10 8 16 33 61 3815 Mainz 34 10 7 17 44 55 3716 VfL Wolfsburg 34 10 7 17 34 52 37R17 FC Ingolstadt 04 34 8 8 18 36 57 32R18 SV Darmstadt 98 34 7 4 23 28 63 25



