Hoffenheim have avoided direct relegation from the Bundesliga this season with a dramatic 2-1 comeback victory over Borussia Dortmund away from home.
Jurgen Klopp's side surged ahead in the sixth minute through striker Robert Lewandowski, who found the target from close range.
Dortmund could have doubled their tally in the 18th minute had Jakub Blaszczykowski's shot not been kept out by Hoffenheim goalkeeper Koen Casteels.
Lewandowski was also denied by Casteels 10 minutes before the half-time interval, before Roberto Firmino and Sejad Salihovic came close in quick succession for the visitors.
Last season's German champions continued to dominate proceedings at the start of the second half, as Blaszczykowski, Kevin Grosskreutz and Ilkay Gundogan all put Casteels under pressure before the hour mark.
BVB created a number of chances as the second half progressed, Mats Hummels, Sebastian Kehl and Gundogan all trying their luck, but failed to add to their tally.
Then in the 77th minute the visitors equalised from the penalty spot. Hummels brought down Kevin Volland inside the Dortmund area and Salihovic made no mistake from 12 yards.
Five minutes later Salihovic scored from yet another penalty, as Roman Weidenfeller was sent off for committing a foul on Sven Schipplock inside his own box.
The result means that Hoffenheim finish third from bottom in the Bundesliga and will now go into a relegation/promotion playoff.