Match ends, Bristol City 0, Cardiff City 2.
Lex Immers and Stuart O'Keefe struck as Cardiff City won at Bristol City in the Severnside derby to move one place off the Championship play-off places.
Immers' close-range finish from Joe Ralls' low cross gave the visitors the lead at half-time.
The hosts put immense pressure on the Bluebirds after the break.
But the Robins could not find the target amid their desire to stay out of the relegation fight and O'Keefe's diving header put the game beyond them.
It secured Cardiff's first back-to-back wins since the summer, boosting manager Russell Slade's hopes of taking his side into the top six.
They beat Preston 2-1 in midweek and followed that up at Ashton Gate to rise above Birmingham in the table.
Defeat left Bristol City 19th before the rest of the Saturday's games.
Bruno Ecuele Manga was outstanding in Cardiff's defence amid Bristol City's early pressure and at the other end Immers made the most of the chance Ralls provided.
The Bluebirds dominated the opening period and deserved their lead at the break even though Jonathan Kodjia drew a good save from David Marshall from an acute angle.
The hosts changed their formation at the restart and were far more lively as they sought to level.
Lee Tomlin, who was yellow carded for dissent as he headed into the tunnel at the break, was also thwarted by Marshall.
And against the run of play, Cardiff put the outcome beyond doubt.
After home keeper Richard O'Donnell deflected Tom Lawrence's shot on to the bar, O'Keefe headed home to seal the win.
Bristol City boss Lee Johnson: "My biggest criticism is that we turned down too many chances to get crosses in. Our decision making on the day was poor at times.
"Our one-on-one defending is not good enough at times and that is something we have to work on.
"But we have to maintain positives. There are things we have to improve on, but our fans are behind us and we need to brush ourselves down and bounce back quickly."
Cardiff City manager Russell Slade told BBC Radio Wales: "I'm really pleased with the win. The performance was okay. It was good in patches.
"We've had to defend and show a different side of ourselves, particularly in the second period where we've defended our box really well.
"And we were ruthless going forward and took our chances really well.
"I see this as continued momentum. We've lost one in nine so that's important, to be hitting that type of form at this stage of the season."
- 2LittleSubstituted forAylingat 65'minutes
- 14ReidSubstituted forWilbrahamat 65'minutes
- 9TomlinBooked at 45mins
- 22KodjiaSubstituted forAgardat 80'minutesBooked at 86mins
- 2PeltierSubstituted forMorrisonat 45'minutes
- 5Ecuele Manga
- 7WhittinghamSubstituted forNooneat 70'minutes
- 13PilkingtonBooked at 24mins
- 27ImmersSubstituted forDikgacoiat 84'minutes
- Graham Scott
- Shots on Target
Second Half ends, Bristol City 0, Cardiff City 2.
Attempt missed. Aaron Wilbraham (Bristol City) header from the centre of the box is just a bit too high. Assisted by Lee Tomlin with a cross following a corner.
Corner, Bristol City. Conceded by Sean Morrison.
Nathan Baker (Bristol City) wins a free kick in the defensive half.
Foul by Anthony Pilkington (Cardiff City).
Foul by Marlon Pack (Bristol City).
Joe Ralls (Cardiff City) wins a free kick in the defensive half.
Foul by Nathan Baker (Bristol City).
Anthony Pilkington (Cardiff City) wins a free kick in the defensive half.
Kieran Agard (Bristol City) is shown the yellow card.
Kieran Agard (Bristol City) has gone down, but that's a dive.
Substitution, Cardiff City. Kagisho Dikgacoi replaces Lex Immers.
Goal! Bristol City 0, Cardiff City 2. Stuart O'Keefe (Cardiff City) header from very close range to the centre of the goal.
Attempt saved. Tom Lawrence (Cardiff City) right footed shot from the left side of the box is saved in the centre of the goal. Assisted by Lex Immers.
Offside, Cardiff City. Scott Malone tries a through ball, but Anthony Pilkington is caught offside.
Substitution, Bristol City. Kieran Agard replaces Jonathan Kodjia.
Attempt missed. Craig Noone (Cardiff City) left footed shot from outside the box misses to the right.
Attempt blocked. Aaron Wilbraham (Bristol City) left footed shot from the centre of the box is blocked. Assisted by Joe Bryan.
Attempt missed. Scott Golbourne (Bristol City) left footed shot from outside the box is close, but misses to the right. Assisted by Luke Freeman.