Martin Harnik, who opened the scoring for Hannover 96, controls the ball ahead of Werder Bremen’s Philipp Bargfrede on Friday night. Photo: David Hecker/EPA

Hannover 96 beat Werder Bremen 2-1 on Friday night to end a run of five straight defeats and all but assure themselves of staying in the top-flight Bundesliga.

Martin Harnik and Felix Klaus were on target in the first half, while Ishak Belfodil netted for Bremen, who had won their previous four duels and the last three games of the season.

Bremen remained 12th with 36 points, and promoted Hannover are right behind them in 13th on 35 – nine points clear of the danger zone.

“It was an important step towards safety,” Harnik told Eurosport. “We ended a run of defeats and awarded ourselves for a good game.”

Hannover started determined into the northern German duel, and drew first blood in the 17th when Harnik beat a defender at the near post to flick home a low cross from Miiko Albernoz.

Bremen had a golden opportunity to level in the 25th minute, but Max Kruse aimed high completely unmarked just inside the area.

They paid for it in the 42nd, with Klaus slotting home for 2-0 on the rebound of Marvin Bakalorz’s lob, which hit the left post.

The visitors were back in the game in the 74th minute from Belfodil’s looping header in off the crossbar.

The forward was denied a minute later by goalkeeper Philipp Tschauner, and Sebastian Langkamp missed a last big chance for Bremen’s equaliser in stoppage time.

The 29th round continues on the weekend, with Bayern Munich to clinch a record-extending sixth straight title on Saturday with five games to spare if they win at Augsburg.