Championship side City survived a red card and a stern examination from League One Brentford to win a Carling Cup First Round tie at Griffin Park
In a rip-roaring cup tie Brentford were by no means second best to their Championship opponents and had plenty of chances to take the tie to extra time, at least.
But they could not breach the City defence and a scrappy Nicky Maynard goal just before the hour mark - and seven minutes after the dismissal of his strike partner Danny Haynes - sent The Bees out.
On a warm night under the Griffin Park floodlights and in conditions perfect for football the two sides served up a cup tie to relish.
For the first 30 minutes the League One outfit were the better side and had enough openings to win any game.
They could have been ahead inside the first minute but a low Sam Wood shot was blocked and makeshift defender Cole Skuse made a fine block to prevent Myles Weston turning home the re-bound.
Goalkeeper Dean Gerken saved a deflected Weston effort soon after before strike partner Steve Kabba shot across the face of goal.
Despite being the better team Brentford were indebted to débutante stopper Nikki Bull for keeping them level after he rushed out to block when a quick Lee Johnson free kick found Liam Fontaine in space.
Marvin Elliott had a shot deflected wide before Kabba missed Brentford's chance of the evening.
The striker skipped away from Fontaine and honestly stayed on his feet despite being pulled back, he rounded Gerken but slipped as he went to shoot and screwed the shot wide.
Bradley Orr forced Bull to turn a shot wide, Kevin O'Connor sliced a half volley wide, Alan Bennett headed over and Gerken made a good low save from Weston as the game continued to flow.
Gerken had to be alert again to turn a fierce Sam Saunders shot around the post and Mark Phillips headed wide before Saunders had an effort deflected over and then a low shot saved.
City came back into it as the half wore on and began to create good openings of their own - Haynes flicked a header wide and then forced Bull into a good low save while Ryan Dickson had to make a good low tackle to stop Maynard going clear.
Gerken saved at Kabba's feet before the break but after half time City began to take charge.
Bull blocked an Andre Blackman shot and Phillips did likewise from a Haynes effort.
The game looked to have swung Brentford's way when Haynes hacked down Dickson and, having already been booked for a show of dissent late in the first half, was given his marching orders by referee Phil Crossley.
But it was City who went ahead - Bull punched a deep cross away and when Fontaine knocked it back in Maynard headed in at the far post.
Phillips made a vital block to deny Gavin Williams a second but Brentford soon had the upper hand.
Gerken saved a low curling free kick from Saunders and then made an even better save from the same man before Kabba had an effort deflected wide.
Phillips had a flicked header saved and Wood shot wide before Brentford came within a whisker of a leveller.
Wood's cross from the right was met by the head of Saunders - Gerken was beaten but the ball hit the bar and then bounced down and hit it again.
Brentford thought they had equalised in the dying seconds when a Weston cross was headed back across by Marvin Williams but with Phillips ready to pounce Louis Carey blocked.
Weston shot over in stoppage time but the goal would not come and Brentford bowed out.
Brentford: Bull; Foster, Phillips, Bennett, Dickson; Saunders (sub Osborne 86 mins), O'Connor, Hunt, Wood; Weston, Kabba (sub Williams 86 mins)
Subs: Moore, Ferrell, Franks, McCluskey
Bristol City: Gerken; Skuse, Carey, Fontaine; Orr, Elliott, Johnson, Blackman (sub Sproule 81 mins); Williams (sub Wilson 77 mins); Haynes, Maynard (sub Akinde 84 mins)
Subs: Basso, Artus, Jackson, Edwards
Bookings: Haynes (44 mins), Skuse (69 mins)
Sent off: Haynes (51 mins) (second yellow card)
Attendance: 3,024 (871 away fans)
By Chris Wickham