Luca Waldschmidt's dramatic late winner against Wolfsburg kept Hamburg up and sent the Wolves into the relegation playoff. Dortmund pipped Hoffenheim to third and Cologne snatched fifth from Hertha.
Hamburg 2-1 Wolfsburg
(Kostic 32', Waldschmidt 88' - Knoche 24')
Hamburg, the only club to have been in the Bundesliga since it was founded in 1963, had to come from behind after Robin Knoche put Wolfsburg in front with a 24th-minute header.
The home side leveled eight minutes later when Lewis Holtby lofted a pass forward and Filip Kostic sidefooted past Koen Casteels in the Wolfsburg goal.
With two minutes left on the clock and Hamburg heading into the relegation playoff, Waldschmidt leaped at the far post to power a header into the net from a Kostic cross.
The goal, scored a day after his 21st birthday, prompted wild celebrations at the Volksparkstadion and left the Wolfsburg players stunned. They will likely have to play Braunschweig, currently third in the second division with one match left, to maintain their Bundesliga status.
Dortmund 4-3 Bremen
(Reus 32', 75' pen, Aubameyang 42', 89' pen - Junuzovic 7', Bartels 46', Kruse 68')
Dortmund made sure of third place and a berth in the Champions League group stage in a topsy-turvy game at the Signal Iduna Park.
They twice had to come from behind, with Marco Reus and Pierre-Emerick Aubameyang each scoring twice, including a penalty each. Aubameyang finished as Bundesliga top scorer for the first time with 31 goals, one more than Bayern striker Robert Lewandowski, the leading marksman last term.
Bremen's erratic season concludes with a disappointing eighth-place finish, although they made an impressive push for Europe after a terrible start.
Hoffenheim 0-0 Augsburg
Hoffenheim, in fourth, failed to take their chances at home to Augsburg and go into qualifying for Europe’s elite club competition, a fine achievement for young coach Julian Nagelsmann and a club with relatively limited resources.
Augsburg were still in danger going into the final day but finish 13th and can look forward to another season in the top flight.
Cologne 2-0 Mainz
(Hector 43', Osako 87')
Cologne climbed above Hertha into fifth and direct qualification for the Europa League thanks to a solid performance at home to Mainz. The Billy Goats return to continental competition for the first time in a quarter of a century.
Cologne took the lead when Mainz goalkeeper Jannik Huth let a Jonas Hector effort through just before halftime and Yuya Osako made sure of the points late on with a cool finish.
Mainz ended in 15th, staying up by virtue of a better goal difference compared to 16th-placed Wolfsburg.
Hertha 2-6 Leverkusen
(Weiser 71', Sami Allagui 86' pen - Chicharito 5', Havertz 31', 45+1', Kiessling 64' pen, Aranguiz 81' pen, Joel Pohjanpalo 90')
Leverkusen made a mockery of Hertha's supposed strength at home with a devastating performance that means Hertha will have to go through qualifying to get into the Europa League group stage.
Chicharito set Leverkusen on their way as early as the fifth minute and they never looked back. Hertha's two late goals were hardly a consolation for the fans who had made the trip to the Olympic Stadium.
Bayern 4-1 Freiburg
(Robben 4', Vidal 73', 90+1' Ribery, 90+4' Kimmich - Petersen 76')
It was a day for celebration and farewells for the champions at the Allianz arena, while Freiburg still managed to finish seventh despite a thumping defeat. They will go into Europa League qualifying if Dortmund beat Eintracht Frankfurt in the German Cup final next weekend.
Bayern said goodbye to captain Philipp Lahm and midfield stalwart Xabi Alonso, and Lahm hoisted aloft the Bundesliga trophy after the whistle, a record-extending fifth league crown for the Bavarians giants.
Frankfurt 2-2 Leipzig
(Jesus Vallejo 83', Blum 90' - Sabitzer 25', Poulsen 56')
Second-placed Leipzig let slip a two-goal lead but finished a comfortable three points ahead of Dortmund in their debut Bundesliga season. Frankfurt, whose season collapsed after the turn of the year, ended in 11th but can rescue their season by beating Dortmund in the Cup final in Berlin next weekend.
Gladbach 2-2 Darmstadt
(Hazard 50', Raffael 65' – Schipplock 63', Heller 90')
Gladbach finish in mid-table obscurity and couldn't even manage to beat relegated Darmstadt in their final outing of a disappointing campaign.
Ingolstadt 1-1 Schalke
(Gross 41' pen - Avdijaj 2')
Ingolstadt, already down along with Darmstadt, came from behind to rescue a point thanks to a Pascal Gross penalty, conceded by Benjamin Stambouli, who was sent off. Dario Lezcano had a penalty saved midway through the second half.
Schalke finish a hugely frustrating 10th, two points behind Gladbach.