Ten-man Hoffenheim wasted a two-goal lead but held on to beat Kaiserslautern 3-2 at home to remain in the running for European football next season.

Hoffenheim grabbed a 2-0 lead in the first half courtesy of goals from Gylfi Thor Sigurdsson in the 28th minute and Sebastian Rudy in the 40th.

But Erwin Hoffer and Rodnei scored within 96 seconds to pull level. Hoffenheim, however, bounced back and won the game from Vedad Ibisevic's goal in the 62nd minute. Hoffenheim, who have suffered just one defeat in their last nine games, finished the game with ten men as Edson Braafheid was given a red card in the 79th minute.

The visitors had the first chance of the game after 11 minutes but Tom Starke turned Rodnei's header behind for a corner. The Hoffenheim goalkeeper then made a fine stop against Ivo Ilicevic three minutes later.

Hoffenheim took the lead after 28 minutes on a counter attack with visiting goalkeeper Tobias Sippel only able to block Sejad Salihovic's strike into the path of Sigurdsson, who finished first time. The hosts doubled the lead on the 40-minute mark after a long ball into the box from Rudy which went in untouched.

After Sippel made a superb stop from Salihovic, the away team pulled a goal back in the 58th minute. Srdjan Lakic's shot went off the left post and straight to Hoffer for a left-foot volley to make it 2-1.

And Kaiserslautern evened the game two minutes later as Starke's attempt to fist away Christian Tiffert's free-kick went off Rodnei and into the goal. Hoffenheim shrugged off the equaliser and regained the lead in the 62nd minute with Salihovic feeding a through ball to Ibisevic, who beat Sippel for a 3-2 lead.

Hoffenheim went a man down with 11 minutes left as Braafheid was given his marching orders with a red card just five minutes after entering the game, but the visitors could not take advantage.