Erling Haaland’s penalty deep into stoppage time earned Man City all three points against Fulham after the hosts played most of the game with ten men.
Fulham were on track to frustrate the champions after Andreas Pereira’s penalty cancelled out Julian Alvarez’s opener.
Man City were made to play more than an hour with ten men as Joao Cancelo was sent off for the foul on Harry Wilson which resulted in Pereira’s goal.
Typically Haaland, fit again after illness and a foot injury but not ready to start, had the final say.
It was his 23rd goal in his 17th appearance for City since joining the club in the summer.
Prior to his intervention, it had looked like City would be left to rue a chaotic period before the interval when they relinquished the lead as well as their composure and control of the game.
Fulham, even without the threat of key forward Aleksandar Mitrovic, had proved more than a handful.
The hosts had started typically strongly and Bernardo Silva brought a good early save out of Bernd Leno before Kevin De Bruyne tested the Fulham keeper with a fierce drive.
The opener came on 17 minutes. Ilkay Gundogan threaded through a fine ball for Alvarez and the Argentinian, starting his third match in a week due to Haaland’s fitness problems, rattled in a shot off the underside of the bar.
John Stones thought he had added a second soon after when he pounced on a rebound from a set-piece but the flag was raised.
City relinquished their grip in a fractious 20-minute spell before the break.
Cancelo was the first to lose his composure as he saw red and conceded a penalty for clumsy challenge on Wilson.
Former Liverpool youngster Wilson was through on goal and shaping to shoot when Cancelo barged him off the ball making no attempt to play at it himself.
Referee Darren England had no hesitation in pointing to the spot and giving the Portuguese his marching orders.
City manager Guardiola was enraged on the touchline and his mood was hardly improved as, first, Pereira made no mistake to level the scores.
Then, even though City did threaten again as Jack Grealish twice went close and Manuel Akanji headed at Leno, the hosts were on the end of some crude challenges.
Harrison Reed was booked for a bad foul on De Bruyne and Wilson then brought down Silva, although this time the City man was shown a yellow card for his reaction.
Enraged, Silva remonstrated with England and then marched a considerable distance to give his assistant an earful too.
Silva was still complaining when the half-time whistle sounded and had to be pushed away from England. Guardiola appeared to take out his anger on fourth official Robert Jones.
The interval took the heat out of the situation but City lacked their usual bite after play resumed.
They could have been punished just after the hour but Wilson slashed a shot wide.
Guardiola immediately turned to Haaland and Phil Foden and the Norwegian seemed to have made the breakthrough as he headed home from a De Bruyne cross but he was ruled offside by VAR.
City applied further pressure but were unable to test Leno until, in injury time, Antonee Robinson clipped De Bruyne in the area. Haaland thumped home from the spot.
Haaland has really made a massive impact since he joined the team.