Manchester City had to fight throughout this semi-final first leg as they will surely have to do in the return game. That is in a fortnight and for Bristol City still to have a chance of reaching Wembley shows how fine a display this was.

Sergio Agüero may have broken the visitors’ hearts with his added-time headed winner but, given the talent at Pep Guardiola’s disposal, Lee Johnson and his players can feel rightly proud at losing by only the odd goal.

Manchester City 2-1 Bristol City: Carabao Cup semi-final first leg – as it happened Read more

As Aden Flint, the Bristol City centre-back, said: “We are disappointed to concede late on but we can hold our heads high. We’ve taken probably the best team in the world almost all the way.”

Guardiola selected a strong side. Agüero and Fernandinho dropped to the bench while Nicolás Otamendi and David Silva were not in the 18. Yet Kevin De Bruyne, John Stones, Ilkay Gündogan, Leroy Sané and the club’s joint-top scorer Raheem Sterling, who has 18 goals this season, were included.

Johnson made one change from Bristol City’s last league game, Frank Fielding replacing Luke Steele as goalkeeper. This was their sixth tie in the competition, against their fifth Premier League opponents, the Robins having already dispatched Watford, Stoke City, Crystal Palace and Manchester United.

There were 7,680 travelling fans – a record at the venue – and they watched the home side come at their end almost instantly from kick-off. In Agüero’s absence Guardiola asked Sterling to operate at centre-forward, The 23-year-old’s pace was evident when De Bruyne turned a ball round the corner into his path from behind halfway.

The contest flowed, with the visitors growing more confident. When De Bruyne swivelled near halfway he ran straight into Joe Bryan. Suddenly the home side were back-pedalling, the left winger racing to the penalty area’s edge before drawing a save from Claudio Bravo, the keeper flinging himself to his right.

Johnson’s side, fourth in the Championship, were hardly overawed. Jamie Paterson, the No10, swept a pass to Josh Brownhill on a left-right diagonal. Oleksandr Zinchenko stamped on his toes and Anthony Taylor gave a free-kick. If this was a warning for City, they continued to pose their own threats on Fielding’s goal.

De Bruyne hit a first-time pass into Sané and the German raced on and slid the ball along the line but it was scrambled clear. Sané and Bernardo Silva were Guardiola’s brightest performers, the Portuguese’s touch and force illustrating his club’s strength in depth as the former Monaco man is not yet a first choice for his manager.

Still, the home side could easily have fallen behind from a cleverly worked free-kick which had Bryan zipping in behind and finding Paterson, who should have finished. Shortly afterwards, though, calamitous home defending proved costly. Eliaquim Mangala was pick-pocketed by Brownhill, then Stones scythed down Bobby Reid in the penalty area. Taylor pointed to the spot, Guardiola wheeled away in disgust and up stepped Reid to give Bristol City the lead. Sterling almost equalised immediately with a lob at an apparently vacant net but Flint made a fine clearing header over the bar to preserve the advantage.

Facebook Twitter Pinterest John Stones brings down Bobby Reid for the penalty that the Bristol City forward scored to put the Championship high fliers ahead. Photograph: Dave Thompsom/AP

Guardiola resisted making the obvious change of introducing Agüero for the second half’s start. Manchester City were now operating with a kind of floating No9, with Sterling having swapped with Silva, who retreated to leave them flat at the front.

The sense with this Guardiola side is they can score at will. So far this season they almost have. When Sterling came at Hordur Magnusson it appeared an equaliser was inevitable but a corner was conceded and Bristol City survived.

They emerged intact when Manchester City next marauded forward. Sané is the club’s quickest player and after he burned beyond the rearguard his left-foot shot disappointed. So, too, did Marlon Pack’s error that gave Sterling a clear run at goal. Yet when he let fly Fielding beat the ball away.

Arsenal to start Alexis Sánchez at Chelsea despite Man City’s £20m offer Read more

Bravo had been enduring a difficult evening with balls played from feet yet his pass that created the equaliser was impressive. It found De Bruyne and after swapping passes with Sterling the Belgian smashed home.

This was a relief for Manchester City, who could be expected to lay siege on their visitors’ area from here until the final whistle. Moments later Flint got a yellow card for stepping in De Bruyne’s path as the playmaker tried to close down the keeper.

The question was whether Guardiola’s men could put the tie to bed against a determined Bristol City side. On 70 minutes Guardiola did introduce Agüero. The manager’s preference had been to save his sole fit striker for Sunday’s trip to Liverpool but the need to press for a second goal prevailed and it was the Argentinian who did the business, from a Silva cross.

Seconds later the whistle went and Guardiola was effusive in congratulating Johnson for his side’s effort.