Pierre-Emerick Aubameyang's late penalty handed Borussia Dortmund a 4-3 win over Werder Bremen to clinch third place in the Bundesliga and a Champions League spot.
Aubameyang's two goals also meant he finished as the Bundesliga's top scorer with 31 goals, one ahead of Bayern Munich's Robert Lewandowski.
Marco Reus also scored twice for the hosts while Bremen's Zlatko Junuzovic, Fin Bartels and Max Kruse netted for the visitors.
Marc Bartra, who was injured in the bomb attack on Dortmund's team bus last month, made his return to action in the game playing the full 90 minutes.
Dortmund's season ends next weekend when they meet Eintracht Frankfurt in the final of the DFB Pokal.