KAISERSLAUTERN, Germany (AP) — Hoffenheim retained its place in the Bundesliga by winning 2-1 in Kaiserslautern in the second leg of their playoff Monday for a 5-2 victory on aggregate.

Big defender Jannik Vestergaard rose above Kaiserslautern's defense to head a home a corner from Sejad Salihovic in the 74th minute and seal Hoffenheim's victory. Defender David Abraham put Hoffenheim ahead in the 44th, but Alexander Baumjohann equalized in the 65th.

"It was a very tough game but the mood in the team is very good and we knew we could win here," Vestergaard said. "We had a miserable season but we've now turned it around."

Hoffenheim finished 16th in the Bundesliga, while Kaiserslautern was third in the second division.

Salihovic, who converted two penalties against Borussia Dortmund to get his team into the playoff, had a spot kick saved in the first half when goalkeeper Tobias Sippel dived to his right and tipped the ball onto the crossbar.

Sippel produced a superb reflex save to turn away a header by Salihovic, but the same player assisted on the first goal. He connected with a free kick, and the 'keeper couldn't keep the ball under control. Abraham pounced to head the ball into the net.

Sippel kept Kaiserslautern in the match when he stopped a point-blank shot by Kevin Volland in the 57th.

Alexander Baumjohann drilled home a free kick in the 65th to level, but Vestergaard ended Kaiserslautern's hopes less than 10 minutes later.