John Stones was on target after Ruben Dias scored his first Manchester City goal as the Premier League leaders extended their winning run to 20 matches with a 2-1 victory over West Ham.
Dias opened the scoring with a first-half header, before Michail Antonio levelled just before the break with the first goal City have conceded at the Etihad Stadium since December.
Fourth-placed West Ham were proving to be hard to break down but Stones joined his central defensive partner Dias on the scoresheet to put City back in the lead 22 minutes from time.
The Hammers were unable to respond as City moved 13 points clear of Manchester United and Leicester City, extending their unbeaten run to 27 matches.
Ederson was called into action to block an Antonio header in an encouraging start from the well-drilled Hammers, operating with three centre-backs, but City were in front with their first attempt on the half-hour mark.
Kevin De Bruyne was the architect, delivering a majestic pinpoint left-footed cross for an unmarked Dias to nod beyond Darren Randolph, who until then had been untroubled after stepping in to replace the injured Lukasz Fabianski.
Antonio scuffed a shot against the outside of the post, although Jesse Lingard appeared to be offside, but the Hammers striker equalised two minutes before the break.
Lingard failed to get a clean contact on a cutback from the marauding Vladimir Coufal, but the on-loan Manchester United midfielder's shot was turned in by the alert Antonio.
Randolph continued despite picking up an injury while taking a goal kick, and the Hammers breathed a sigh of relief when there was no City player on hand to turn in De Bruyne's cross at the end of a surging run down the left.
Gabriel Jesus replaced a rusty Sergio Aguero, starved of service in his first start since October, with an hour played, but it was another centre-back who put Pep Guardiola's men back in front.
Riyad Mahrez teased Ben Johnson in the penalty area and picked out Stones, who drilled clinically beyond Randolph after 68 minutes.
Visiting boss David Moyes introduced Jarrod Bowen and Said Benrahma in a bid to salvage a point, which Issa Diop failed to do when he headed wide from close range right at the end as City took another stride towards regaining the title.