Manchester City needed a late Sergio Aguero winner to claim a 2-1 advantage from the first leg of their Carabao Cup semi-final against Bristol City.
The runaway Premier League leaders were given a stern test by the Championship side and fell behind to a Bobby Reid penalty after 44 minutes at the Etihad Stadium.
Pep Guardiola's side created numerous chances in a strong response but, after Kevin De Bruyne's well-worked 55th-minute equaliser, they had to wait until substitute Aguero headed in a Bernardo Silva cross in injury time.
Tweets of the match
The Robins tweeted one of their much talked about goal GIFs when they took the lead, depicting Reid letting off a fire extinguisher. Their hosts then sent out a GIF of their own when equalising, featuring a figure wearing the Blues' home shirt, clenching both fists in celebration, with a 'smiling face with sunglasses' emoji superimposed over the head.
Star man - Frank Fielding
There were hugely commendable performances throughout the visitors' team, and goalkeeper Fielding certainly had a fine evening. One point-blank stop to deny Raheem Sterling was particularly impressive.
View from the dugout
Although this first leg eventually ended in defeat, Bristol City boss Lee Johnson can only be immensely proud of what he saw from his players. They produced another memorable display against top-flight opposition, having already seen off Watford, Stoke, Crystal Palace and Manchester United in the competition this term - and one that means they are still very much in the tie ahead of the second leg at Ashton Gate in a fortnight.
Guardiola saw his men far from at their best, but it must be acknowledged that it was another decent show of character from the quadruple-chasing Blues to still manage to come through this distinct off-night with a victory.
Bristol City have scored 17 goals in the EFL Cup this season, more than anyone other team. Twelve of those have come against Premier League opposition.
Claudio Bravo 6 (out of 10), Danilo 6, John Stones 6, Eliaquim Mangala 5, Oleksandr Zinchenko 6, Ilkay Gundogan 6, Yaya Toure 5, Bernardo Silva 6, Kevin De Bruyne 7, Leroy Sane 6, Raheem Sterling 6.
Sergio Aguero (for Toure, 70 mins) 6, Kyle Walker (for Zinchenko, 80) 6.
Frank Fielding 8 (out of 10), Bailey Wright 8, Aden Flint 8, Nathan Baker 8, Hordur Magnusson 7, Josh Brownhill 7, Marlon Pack 7, Korey Smith 7, Joe Bryan 7, Jamie Paterson 7, Bobby Reid 7.
Liam Walsh (for Magnusson, 72) 6.
Who's up next?
Liverpool v Manchester City (Premier League, January 14)
Bristol City v Norwich (Sky Bet Championship, January 13)