Raheem Sterling's double and another goal from Gabriel Jesus propelled Manchester City to the top of the Premier League before Liverpool's match against Chelsea, who won 3-1 at Crystal Palace.
After 15 minutes Sterling had already missed a good chance to give City the edge after diving in to give advantage to City. He then closed the points at close range after the break.
Luka Milivojevic signed an unexpected end to the game for Pep Guardiola's team when he hit a free kick at the edge of the box nine minutes from the end of the match, but Jesus had the last word by finishing a counterattack in the 90th minute.
Sterling scored 21 goals for City this season in all competitions, and Guardiola praised his ability to dismiss incidents that did not surround him.
"The loss of Burnley was worse than today," he said at a press conference. "We need to learn about golf and other sports like this.The most important action is the following: sometimes you miss, you have to forget it and you have to move on to the next one. He made an incredible finish and Kevin's pass was remarkable, Sterling's finish was amazing. "
Sterling said he was relaxed about the situation and added that City could not afford to skids in their title race with Liverpool.
"When I was younger, you always wanted to score your first opportunity and sometimes it does not happen that way," he said.
"You do not fight, there are 80 minutes left, you just have to be ready for the next opportunity, it's the mentality, keep going and luck will come."
City began deliberately, giving David Silva a half-opportunity, unable to connect neatly with a Kyle Walker center.
They missed a great opportunity 10 minutes into the match when Silva were brilliantly cleared off the bench and sent the ball to Sterling who could not get away from the position, and could only stand in front of the post.
But Sterling made amends to the quarter-hour when Kevin De Bruyne managed to break through the right flank allowing him to advance into the box and score the goal.
Jeffrey Schlupp was replaced by Cheikhou Kouyate, replaced by Cheikhou Kouyate, while City continued to threaten and Scott Dann tried to clear another center of Silva.
Sterling showed the other side of his game, coming back to help Walker deal with Wilfried Zaha, and Aguero tugged on the ball as City maintained control.
But the palace soon showed an attack on life, with the crossing of Milivojevic and Christian Benteke heading towards the city before the center was completely cleared.
Shortly after the half-hour, Sane forced Vicente Guaita to make a good save by tilting the first post.
Guaita was again in the heat of the action when the ball fell on De Bruyne and that he shot towards the goal, and then Benjamin Mendy's shot was direct on the palace keeper.
City began the second period in the same dominant way, De Bruyne narrowly failing against Sergio Aguero and Guaita getting together well when a De Bruyne cross deflected by Martin Kelly deviated.
But the visitors doubled their advantage after 63 minutes, Sterling again on the mark by coldly converting Sane's center from the left.
Dann headed well from the corner of the palace and City took Aguero away and replaced him with Gabriel Jesus with an eye on the Champions League match against the Spurs next week.
Palace introduced Max Meyer to Andros Townsend – and they found a way into the match when James McArthur was fouled and Milivojevic made a free kick at home.
McArthur gives way to Bakary Sako for Palace, John Stones replaces Sane for City, which eliminates any doubts about the outcome when Jesus keeps his cool after De Bruyne played in the area.