Match ends, Manchester City 4, Cardiff City 2.
Manchester City passed the 100-goal mark for the season as they saw off a determined Cardiff side to stay one point behind leaders Arsenal at the top of the Premier League.
Edin Dzeko's opener brought up City's century of strikes in just 34 games in all competitions, the quickest that landmark has been reached in the Premier League era.
But, despite the final scoreline, this game was not simply a celebration of their attacking verve.
Cardiff, who fall to the bottom of the table after their second straight league defeat under new manager Ole Gunnar Solskjaer, worked hard throughout to stop this being the kind of free-flowing victory that City have enjoyed so often during this campaign.
The Bluebirds levelled through Craig Noone's neat finish and although Jesus Navas quickly restored the home side's lead, the three points - and City's 100% home record in the league this season - were not secure until Yaya Toure and Sergio Aguero added late goals.
Manuel Pellegrini's men were not at their best but they began well enough, going close in the first minute when Kevin McNaughton's last-ditch challenge denied Dzeko, before Navas turned the loose ball wide.
City continued to dominate but they had to wait until the 14th minute to score their opener - and even then they were unsure at first whether it would count.
Dzeko swivelled to meet David Silva's pull-back at the near post but his scuffed shot was hacked clear as it bounced over the line and, for the first time in the Premier League, goal-line technology was used to show it had gone in.
That meant the celebrations at Etihad Stadium came in instalments, as some fans took time to realise referee Neil Swarbrick had given a goal. They were then shown the Hawk-Eye replay on the big screens around the ground to prove Swarbrick's decision was correct.
Those same giant screens immediately flashed up the message 'City, 100 goals and counting' but, the next time the ball was in the net, it was Cardiff who put it there.
The Bluebirds had offered little threat in the early stages but, after surviving a flurry of further City attacks, they equalised with their first meaningful foray forward, after 29 minutes.
Jordon Mutch's flick found Craig Noone dashing into the area from the right and he turned past Vincent Kompany before beating Joe Hart with a low strike.
The home fans, who had seen their team win all 10 of their previous Premier League games this season, were stunned into silence, but it did not last long.
Four minutes later, Dzeko was crowded out as he ran in on goal from Toure's clipped ball but Ben Turner's tackle sent the ball into Navas's path and he slotted past David Marshall.
Cardiff's resistance did not stop there, however, and they also enjoyed the better chances immediately after the break.
Mutch saw his fizzing strike pushed away by Hart, who also did well to deny Noone after he again cut in from the right.
City looked frustrated rather than anxious at the fact the game was still in the balance as it entered the final 15 minutes, but Toure soon put it to bed.
He burst forward and exchanged passes with substitute Aguero before burying a low shot into the bottom corner.
Aguero added City's fourth soon afterwards, taking his side's tally to 103 in what has become a spectacular season in front of goal, before Frazier Campbell's injury-time volley brought some consolation for a Cardiff side who had given so much.
Manchester City manager Manuel Pellegrini: "Maybe I am not 100% happy because we conceded the second goal in the last minute. But we scored four and missed five or six clear chances so if we continue to play like we are, we are always going to score more than we concede.
"We are playing fantastic football at the moment. We play with fantastic intensity and that is how we must continue. The best way to play is the way we are playing now. I know it is easier to go back with 10 players in our box and try and have a couple of counter attacks, but that is not my way, it is not the style I think this club wants.
"It is impossible for me to have a headache when you have three strikers [Sergio Aguero, Edin Dzeko and Alvaro Negredo] playing at the level they are at the moment."
Cardiff City manager Ole Gunnar Solskjaer: "We did feel that after about 60 minutes we were in the game. The crowd was maybe turning a little against them and you start wondering if we could get something from the game, but obviously they have quality players who scored their extra two goals.
"They have been dominant, our gameplan was to start on the front foot, be aggressive but we played against a very good team. When you are in the run of form like they are, they just go into the next game expecting to win, so good luck to them.
"We can stay up. No doubt about that. The league got tighter today - from bottom to 10th it is five points. We will look to improve. Parts of all the performances have been very good. For half an hour we did very well today but for two or three minutes they blitzed us."
- 13KolarovBooked at 74mins
- 42Y Touré
- 15NavasSubstituted forClichyat 82'minutes
- 14García Fernández
- 9NegredoBooked at 18minsSubstituted forAgüeroat 62'minutes
- 21SilvaSubstituted forMilnerat 80'minutes
- 25McNaughtonSubstituted forJohnat 68'minutes
- 17GunnarssonSubstituted forWolff Eikremat 78'minutes
- 7WhittinghamSubstituted forBellamyat 68'minutes
- 15Wolff Eikrem
- Neil Swarbrick
- Shots on Target
Second Half ends, Manchester City 4, Cardiff City 2.
Goal! Manchester City 4, Cardiff City 2. Fraizer Campbell (Cardiff City) left footed shot from very close range to the bottom right corner. Assisted by Magnus Wolff Eikrem with a cross following a corner.
Attempt saved. Aleksandar Kolarov (Manchester City) left footed shot from the left side of the box is saved in the bottom right corner. Assisted by Edin Dzeko.
Corner, Cardiff City. Conceded by Joe Hart.
Attempt saved. Craig Noone (Cardiff City) left footed shot from outside the box is saved in the centre of the goal. Assisted by Magnus Wolff Eikrem.
Attempt blocked. Magnus Wolff Eikrem (Cardiff City) right footed shot from outside the box is blocked.
Corner, Cardiff City. Conceded by Gaël Clichy.
Foul by Pablo Zabaleta (Manchester City).
Jordon Mutch (Cardiff City) wins a free kick in the defensive half.
Attempt missed. Vincent Kompany (Manchester City) header from the centre of the box misses to the right. Assisted by Aleksandar Kolarov with a cross following a corner.
Corner, Manchester City. Conceded by Fraizer Campbell.
Attempt saved. Edin Dzeko (Manchester City) right footed shot from the centre of the box is saved in the bottom right corner. Assisted by Aleksandar Kolarov.
Attempt missed. Aleksandar Kolarov (Manchester City) left footed shot from the left side of the box is close, but misses to the right. Assisted by Gaël Clichy.
Edin Dzeko (Manchester City) wins a free kick on the left wing.
Foul by Kévin Théophile-Catherine (Cardiff City).
Attempt blocked. Sergio Agüero (Manchester City) left footed shot from outside the box is blocked.
Corner, Manchester City. Conceded by Ben Turner.
Foul by Sergio Agüero (Manchester City).
Jordon Mutch (Cardiff City) wins a free kick in the defensive half.