HANNOVER, Germany (AP) — Hannover defeated Werder Bremen 2-1 to end its five-game losing streak and all but secure Bundesliga survival on Friday.

The visitors went closest early on but Martin Harnik broke the deadlock when he got his toe to Miiko Albornoz' cross and beat Bremen goalkeeper Jiri Pavlenka at the near post.

Felix Klaus made it 2-0 before the break, converting on the rebound after Marvin Bakalorz struck the post.

Ishak Belfodil pulled one back with over 15 minutes remaining with a header from Thomas Delaney's whipped-in cross.

But Hannover managed to hold on to move nine points clear of the relegation zone and 15 clear of Cologne in a direct relegation place with five games left.

Bremen coach Florian Kohfeldt, who extended his contract to 2021 during the week, suffered his first defeat in six games. His side stayed ahead of Hannover by a point.