On a day when champions Bayern Munich lost 4-1 to Stuttgart, Borussia Dortmund just about held on to claim their place in the Champions League and Hamburg were relegated for the first time ever.
Needing a six-goal swing to pip Dortmund, or a three-goal one to overtake Hoffenheim, Bayer Leverkusen gave it their best shot with a 3-2 win over Hannover in which they missed an early penalty and had a late one ruled out from the VAR, before Niclas Fullkrug and Martin Harnik broke their hearts with two consolation goals in stoppage time.
Indeed, their three goals weren't enough as Hoffenheim beat Dortmund 3-1 thanks to goals from Andrej Kramaric, Adam Szalai and Pavel Kaderabek, with Marco Reus on the scoresheet for the away side.
The result meant that, behind Schalke in second place -- who won 1-0 over Eintracht Frankfurt -- Dortmund, Hoffenheim and Leverkusen all finished on 55 points. Hoffenheim's goal difference of +18 saw them finish third, Dortmund's of +17 had them fourth and Leverkusen were one behind on +16 and take a spot in the Europa League.
RB Leipzig finished sixth and claimed the final spot in the Europa League with a 6-2 win over Hertha Berlin.
Stuttgart finished seventh, outside the European places, but netted three times in 13 second half minutes to hand Bayern a shock loss. They can claim a spot in the Europa League if Bayern complete the double with a German Cup win over Eintracht Frankfurt next weekend.
Elsewhere, Liverpool loanee Divock Origi scored a crucial goal to help VfB Wolfsburg to a 3-1 win over FC Cologne, who had already been relegated, which keeps them up for now.
As a result, Wolfsburg face a relegation playoff but avoided the immediate drop as Hamburg went down for the first time in Bundesliga history despite a 2-1 win over Borussia Monchengladbach. Fans set off flares before the end of the match with riot police forced to stop the game and make their way onto the pitch, before the referee blew the whistle 18 minutes late after the pitch was cleared.
Freiburg's 2-0 over Augsburg was enough to keep them three points off the drop zone and maintain their top flight status, while Mainz lost to Werder Bremen 2-1 but were also safe on 36 points.