An entertaining encounter saw Hoffenheim edge Borussia Dortmund 3-1 on Saturday - a result which proved just enough for both sides to secure Champions League qualification.
With two of the top-four spots still to play for heading into a thrilling final round of Bundesliga action, these two sides were locked in a four-way tussle with Bayer Leverkusen and RB Leipzig to see who would join Bayern Munich and Schalke as Germany's representatives at European football's top table for 2018-19.
Although Leipzig won handsomely at Hertha Berlin, other results did not go their way while Leverkusen's 3-2 success against Hannover saw them finish tied on 55 points with both of these teams, ultimately undone by a final goal difference inferior to Hoffenheim's and Dortmund's by just four and three respectively.
Roman Burki's mistake gifted Andrej Kramaric the opener midway through the first half, but that lead was cancelled out by Marco Reus in the 58th minute.
Adam Szalai soon restored Hoffenheim's advantage, however, and Pavel Kaderabek's scrambled effort saw Hoffenheim leapfrog their opponents into third, leaving Dortmund in a perilous position just above Leverkusen.
That left Leverkusen still needing a two-goal swing in their favour, but in chasing a fourth Heiko Herrlich's side conceded twice on the counter in the final minutes, effectively putting an end to their hopes and calming the frayed nerves of Dortmund.
Despite needing only a draw to achieve their objective, Dortmund gave little thought to taking a passive approach as Raphael Guerreiro forced Oliver Baumann into two strong saves inside 18 minutes.
Burki was similarly impressive in keeping out Kramaric's fierce drive shortly afterwards but the Dortmund goalkeeper's dreadful error allowed Hoffenheim to forge ahead in the 26th minute.
Having got himself in a tangle after mis-controlling a simple backpass, Burki was harried by Mark Uth and his rushed clearance fell straight to the feet of Kramaric, who placed his shot into the bottom-left corner from the edge of the box.
Burki went some way to redeeming himself by thwarting Szalai from close range as Dortmund struggled to recover from falling behind, although they ought to have been level when Andre Schurrle fired wide after Reus sent him clean through on the break.
Hoffenheim began the second half brightly as Burki denied Szalai with his feet but somewhat against the run of play Dortmund equalised shortly before the hour.
Guerreiro did superbly to get in down the left and he slipped in a ball for Reus, who was perhaps fortunate to take the pass in his stride before stabbing past Baumann from four yards.
Parity lasted only five minutes, however, as a fine team moved resulted in Kramaric playing in Szalai, who dinked the ball delightfully over the onrushing Burki.
The hosts were celebrating again with 17 minutes to go following a mad scramble which saw Manuel Akanji clear brilliantly off the line and Burki deny Ermin Bicakcic's header, only for Kaderabek to volley in.
As news of Hannover's late goals began to filter through, both sides knew a top-four finish was assured and the last act of the match saw Dortmund send on veteran goalkeeper Roman Weidenfeller in place of Burki for his final appearance before retirement.
Key Opta Stats:
- Peter Stoger, who took over in December 2017 when Dortmund were eighth, led the team into the Champions League for the seventh time in the last eight seasons.
- Hoffenheim qualified for the Champions League for the first time in their 10-season history in the Bundesliga.
- For the first time under Stoger, Dortmund lost two league games in a row.
- Dortmund lost four of their last seven league games this season, after staying unbeaten in Stoger's first 12 top-flight games.
- BVB conceded 14 goals in their last seven league games after conceding only two goals in the first seven of the campaign.