Bradley Orr could not have done anything to stop his own goal
Cardiff City booked their place in the FA Cup fourth round thanks to a 74th-minute own goal by Bristol City's Bradley Orr.
Peter Whittingham set Michael Chopra free and the striker's shot across goal struck the post before rebounding in off a helpless Orr.
Ross McCormack, Chopra and Whittingham were all denied by Robins keeper Dean Gerken who kept them in the game.
Evander Sno had one of few chances for the visitors driving wide.
Cardiff now face a home tie against Leicester City in the next round on Saturday.
The Bluebirds looked the more dangerous on the attack in this third round replay and Gerken was the busier of the two keepers.
First he parried Whittingham's 25-yard effort away for a corner and later denied McCormack who drove straight at him.
Then McCormack turned provider to Chopra but Gerken rushed out quickly to stop his shot.
The Robins keeper could do nothing about the goal though as he was well beaten by Chopra's shot and the unfortunate Orr could not get out of the way as he raced back and the ball bounced off him into an empty net.
Bristol City rarely troubled their hosts and both McCormack and Chopra had chances to seal the win late on.
Cardiff manager Dave Jones:
"It's a fantastic result for the boys today.
"It looked like two tired teams out there and it took a long time to get going.
"Chops has broken away two or three times and on another day he sticks them away, but sometimes you need a bit of luck and I will take it however it goes in.
Bristol City manager Gary Johnson:
"It got to the stage where only one goal was going to win it but we didn't really create anything today.
"Michael Chopra is brilliant at playing on the edge and he did that all through the game but both teams competed, tackles were fierce although the pitch was a little uneven.
"We now have some time to prepare for the league meeting against Cardiff at our ground and we will be ready for them."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.