This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

MONCHENGLADBACH, Germany (AP)Borussia Monchengladbach substitute Patrick Herrmann scored with the last kick of the Bundesliga game to seal a 3-1 win over Stuttgart and ease the team’s fears of a crisis on Friday.

Jonas Hofmann and Marcus Thuram also scored as Gladbach ended a three-game losing streak, including its German Cup loss at Darmstadt, and a four-game run without a win in all competitions.

Weeks before the World Cup begins in Qatar, Germany midfielder Hofmann marked his timely return from a shoulder injury with an early goal as Gladbach dominated the opening half hour.

Hofmann scored in the fourth minute when he connected perfectly with Alassane Plea’s cross from the left to send the ball into the left corner.

Stuttgart goalkeeper Florian Muller made two good saves before Plea set up Thuram for Gladbach’s second in the 25th after another well-worked team move.

Stuttgart fought its way back with a goal from Tiago Tomas 10 minutes later. Borna Sosa found Tomas on the edge of the penalty area, and the Portuguese forward performed a clever trick with his heel to turn and elude a defender, then took a step inside before firing inside the left post.

Gladbach was unable to reimpose its dominance in the second half and had to wait till the fourth minute of injury time for Herrmann to seal the win on a counterattack.

AP World Cup coverage: and