Manchester City needed a stroke of luck to keep their winning streak intact as the Citizens came from behind to beat Premier League newcomers Huddersfield Town 2-1 in an engaging encounter at the John Smith’s Stadium.

Having seen their lead at the top of the table get cut to five points after arch-rivals Manchester United beat Brighton on Saturday, Pep Guardiola’s side was widely tipped to sweep aside the Terriers in Sunday’s final Premier League clash.

Don’t miss: Premier League: Alexis Sanchez penalty ensures Arsenal beat Burnley

The Citizens trotted out in their standard 4-3-3 formation with striker Sergio Aguero retaining his place at the apex, flanked by young wingers Raheem Sterling and Leroy Sane.

City were dominating possession, but took a while to fashion clear-cut chances. Aguero had a fierce shot saved by Jonas Lossl and while the rebound fell to the in-form Sterling, the diminutive winger was rapidly closed down and his effort went wide of the post.

Huddersfield, who had claimed the prized scalp of Manchester United earlier in the season, should have opened the scoring in the first-half when Aaron Mooy’s cross somehow managed to find its way to Zanka, but the Huddersfield defender could not apply a finish.

City have been terrific when going forward this season, but defensive frailties continue to be a concern and the Sky Blues’ issues at the back were highlighted once again when the Terriers took a shock lead on the stroke of half-time.

Tom Ince’s corner was flicked on by Christoper Schindler and City centre-back Nicolas Otamendi got an inadvertent touch off his shoulder to guide the ball into the back of the net.

Guardiola’s side stormed forward after the interval and were handed an almost immediate lifeline, via contentious circumstances. Sterling, who had won a questionable penalty during City’s 3-1 win over Arsenal recently, went down inside the box after a tangle with Scott Malone.

Referee Craig Pawson pointed to the spot and Sergio Aguero nonchalantly sent Lossl the wrong way to put the visitors back on level terms in the 47th minute.

The Citizens continued to batter Huddersfield’s goal with wave after wave of attack and Sane very nearly scored their second with a free-kick that thundered off the crossbar, with Lossl stranded.

Gabriel Jesus was brought on by Pep Guardiola in the final 10 minutes as the Sky Blues amped up the pressure in a bid to keep their winning streak intact.

And the Brazilian’s introduction proved to be key, as while his initial shot was saved by Lossl, the rebound fell into Sterling’s path and the winger literally walked into the goal in the 84th minute.

City’s winning streak was extended to 11 Premier League games, but perhaps more importantly, they restored their eight-point advantage over second-placed Manchester United and are firm favourites to clinch the title, despite having two-thirds of the season still to play.

The Citizens now have a home tie with Southampton on Wednesday to focus on, while Huddersfield, who are in 11th place, travel to Arsenal on the same day.