HUDDERSFIELD, England — Three thoughts on Manchester City’s 2-1 win over Huddersfield, as Raheem Sterling helped the league leaders come from behind.

1. Sterling helps Man City get there in the end

Manchester City are laying waste to the Premier League, but they won’t have many tougher nights than this. Trailing Huddersfield at half-time through a Nicolas Otamendi own goal, they needed a Sergio Aguero penalty and another late Raheem Sterling goal to secure all three points.

It was Sterling who came to the rescue against Bournemouth in the early stages of the season. His manager Pep Guardiola has urged him to work on his goal scoring record and the winger seems to have heeded the advice.

Prematch notions that City would walk to victory were quickly dispelled by an accomplished and composed Huddersfield defence that sat deep and held strong; City had to work for every chance.

Aguero managed to get the ball in the net after 13 minutes, only for his effort to be ruled out for offside. Sane offered him a second chance to get on the scoresheet midway through the first half, bursting down the flank and cutting the ball back low into the six yard box, but Aguero couldn’t quite connect.

Seven minutes before the break, Guardiola was left rubbing his head in frustration as David Silva dropped a delicious reverse pass at the feet of Aguero, who drew a fine save from Jonas Lossl, but Sterling could only blast the rebound into the side-netting.

Huddersfield had their own chances, too. After good work from Tommy Smith and Thomas Ince, Vincent Kompany nearly headed into his own net. Thirty seconds later, Nicolas Otamendi showed him how it is done. Christopher Schindler rose to meet the second corner, nodded the ball on and it caught the City centre-back on the shoulder and ricocheted in.

That sparked scenes of jubilation on the Huddersfield bench where David Wagner looked as happily surprised as everyone else in the stadium. But it took barely a minute of the second half for City to draw level. Scott Malone hauled back a goal-bound Raheem Sterling and referee Craig Pawson immediately pointed at the spot. Aguero finally made his mark, sauntering up to the spot and sliding the ball home.

As a result, City pushed higher and Huddersfield dropped even deeper. A neat exchange of passes between Sane and Aguero would have led to a second had it not been for the lightning reflexes of Lossl. A Sane free kick rattled the Huddersfield crossbar on 57 minutes and Fernandinho was so eager not to drop points that he dived headlong into the penalty area to try to earn another spot kick, earning himself only a yellow card for his efforts.

With time running out, Guardiola took the bold step of replacing Kompany with Gabriel Jesus and using Otamendi as a lone centre back. Every City player was pushed deep into the Huddersfield half and finally it paid off when Sterling was able to loop the ball into the back of the net at the end of probably City’s messiest passing move of the day.

With over 75 percent of possession and 12 shots to their name, it was hard to argue that City didn’t deserve it. But Huddersfield came so close to pulling off a shock result.

2. Huddersfield showed a blueprint to stifle City

For City, this season is turning into an extended run of “assault the base” mode gaming. Very few teams want to come out and play against them because coming out to play against City is suicidal.

Huddersfield have won games this season by executing a quite brutal press on the halfway line, hunting in packs and breaking into space. But against the bigger teams, Wagner prefers a more cautious approach. Here, City’s players were allowed to get within 40 yards of the Huddersfield goal before they were engaged.

With two defensive midfielders within yards of a well drilled back four, space was at a premium. City are used to that and they reacted accordingly, deploying Sane and Sterling right out to the touchlines. With Fabian Delph and Kyle Walker capable of pushing right up towards them, Huddersfield’s own widemen were forced back, forming something closer to a back six.

Again and again, City washed forward, first-touch passing as quickly as they could, hoping to capitalise on one moment of indecision. It took a penalty for City to get back into the game and for some time it seemed that a point would be all they’d get. Fortunately for them, Sterling was there to snatch all three and Rajiv van La Parra’s red card after the final whistle only added insult to injury for the home side.

3. Ederson proves why City axed Hart

Guardiola’s bold removal of Joe Hart last season failed to pay dividends when Claudio Bravo struggled to adjust to the English game. But now that Ederson has arrived, even Hart’s most vehement supporters must see the method in what seemed like madness.

Even early in the game, City often have every outfield player in the opposition half, leaving at least 70 yards of space open for a long ball and counter attack. But those dangerous balls over the top are neutralised with a goalkeeper as alert and brave as Ederson, who is happy to sprint out of his area to clear his lines.

Huddersfield tried the trick on several occasions. It didn’t work once. Where Bravo flailed, Ederson has excelled, settling in smoothly that he seems to have been here for years.