But it didn't take the league leaders long to draw level.
Sterling has often been criticised for his finishing in the past but is averaging a goal every 89 minutes this season following his victor in Tuesday's 1-0 victory over Feyenoord in the Champions League.
Vincent Kompany and Manchester City got all they could handle from Huddersfield Town at the John Smith's Stadium, but survived for a 2-1 comeback win that secured their unbeaten record for another few days.
Their lead was erased within two minutes of the restart when Sergio Aguero calmly converted a penalty after Sterling was brought down by Scott Malone.
City are firm favourites to win the title after Guardiola went without a trophy for the first time in his managerial career last season.
His goal at Huddersfield was his 12th in 18 appearances in all competitions this season.
Pakistan calls in army as Islamabad protests turn violent
The government also shut down Facebook , Twitter , and YouTube in Islamabad and Rawalpindi to block coverage of the operation. A mob attacked former Interior Minister Nisar Ali Khan's house in Rawalpindi and broke the main gate of his house.
Table-topping City has 37 points from 13 games while Huddersfield sit 11th with 15 points in a promising first Premier League campaign.
"We have a lot of players who have the ability to score a goal, not just the strikers".
There was some fortune attached to the winning goal.
Sterling's victor won Man City the three points and move eight points clear of their nearest rivals, Manchester United.
"But to fight to avoid that, mentally, and in the way we want to play, is fantastic". "We knew they were so aggressive, so strong, but we are so happy for the way we won".
"We spoke about us needing this kind of situation to happen", said Guardiola. For instance when you play against Napoli - they played an unbelievable 30 minutes and you have to accept it and say they played better than us in that period of the game.