Manchester City had to work hard to see off a spirited Everton side and stay five points behind Premier League leaders Liverpool.
Riyad Mahrez and Raheem Sterling both struck in the final 20 minutes to give City victory after they had wasted some good chances, but they needed two excellent saves by Ederson to hold off the Toffees.
It was a convincing end to a tense evening, with Pep Guardiola's side going to a murky Merseyside knowing only victory would suffice after seeing the Reds maintain their flawless start earlier on Saturday.
The defending champions started well and, after Ilkay Gundogan somehow hit the bar from point-blank range, they took a deserved lead thanks to another moment of genius from Kevin De Bruyne.
His trademark whipped cross from the right was nodded home by Gabriel Jesus, giving the Belgian his eighth assist of a stellar campaign.
That spelled trouble for Everton, whose boss Marco Silva was under pressure before kick-off after back-to-back league defeats, but they responded well and were soon level.
Toffees substitute Alex Iwobi fought his way into the box and the ball dropped for Seamus Coleman, who beat Ederson with a dinked shot before Dominic Calvert-Lewin made sure of the equaliser with a diving header on the line.
City were playing some neat football but with top scorer Sergio Aguero starting on the bench along with David Silva and Bernardo Silva, they could not make it count in the final third.
Sterling should have restored their lead at the start of the second half when he ran clear from a delightful Mahrez pass, but his first-time finish fizzed wide.
Everton were asking questions too, particularly from set-pieces, before Mahrez provided the spark City had been waiting for when he curled home a stunning free-kick into the bottom corner from 20 yards out.
The home side refused to lie down and Ederson made vital stops from Calvert-Lewin then Yerry Mina, but Sterling made sure of the points when he forced the ball home after Aguero's cross-shot was saved.