Hoffenheim are in pole position to retain their top-flight place ahead of their play-off semi-final second leg with Kaiserslautern.
The Bundesliga strugglers recorded only their sixth home win of the season in the first leg with a comprehensive 3-1 victory over Franco Foda’s side.
Kaiserslautern are looking to return to the top division at the first attempt following relegation last year, but their hopes were hit as two goals from Roberto Firmino and one from Sven Schipplock gave Hoffenheim the advantage.
The defeat was only their third in 12 matches and Mohamadou Idrissou’s consolation gives them hope going into the deciding match of their season.
Hoffenheim will be buoyed by the victory as they look to preserve their Bundesliga status for a fifth season.
They looked doomed to automatic relegation towards the end of the campaign, but a last-day victory over Borussia Dortmund saw them leapfrog Fortuna Dusseldorf to make the relegation play-off.
Goals have been their downfall this season, as their top scorer in the regular season was midfielder Sejad Salihovic, who bagged just seven. They were also not good at keeping them out at the other end, conceding a league-high total of 67.
After their relegation last season, Kaiserslautern challenged at the top of the second division for automatic promotion but could not get past Hertha Berlin and Eintracht Braunschweig, having to settle for a play-off to secure their return to the top division.
Idrissou’s 18 goals this season have been crucial in their successful campaign and he was well supported by strike partner Albert Bunjaku, who got 13.
Foda will hope the duo can combine to turn around the two-goal deficit.