Bristol City extended their remarkable unbeaten record at Ninian Park to 21 matches with a deserved victory over Cardiff.

Brian Tinnion's 49th minute penalty and a Christian Roberts strike settled a tense encounter between two of the Second Division's promotion contenders.

The visitors leapfrog the Bluebirds into second place and keep the pressure on leaders Wigan.

Cardiff certainly had enough chances to give manager Lennie Lawrence the three points on his 55th birthday, but struggled to keep their strikes on target.

They wasted three glorious chances - two of them in the opening ten minutes - to take a first-half lead.

Peter Thorne completely missed a free header from six yards out when an Andy Legg long throw sailed over Bristol goalkeeper Steve Phillips.

And then strike partner Robert Earnshaw blasted a volley over the bar from close range.

The Wales international was guilty of further poor finishing on the half-hour mark when a defensive error presented him with a gilt-edged chance.

Phillips' low clearance went straight to the feet of captain Tommy Doherty, but his attempted back-pass went straight to Earnshaw's feet who was lurking at the edge of the box.

Cardiff's top scorer hesitated while struggling to get the ball out from underneath his feet and Danny Coles recovered to nick the ball as Earnshaw prepared to shoot.

Cardiff were also left off the hook as the half drew to a close.

Scott Murray found space in the box after left-back Chris Barker misjudged a header, but his low cross was crucially intercepted by Fan Zhiyi.

The former China captain was handed his league debut to cover for the suspended Rhys Weston, and coped comfortably with everything Bristol threw at him at the heart of the defence.

There was barely four minutes on the clock in the second-half when Bristol silenced the 15,000 or so Cardiff fans at Ninian Park.

Neil Alexander pulled off a great save from Matt Hill's header from a corner, but Hill was first to the loose ball and went down under Thorne's challenge.

Contact seemed to be minimal to say the least, but the referee had no hesitation to award a penalty.

Tinnion sent Alexander the wrong way and Bristol could hardly believe their luck.

Having enjoyed the lion share of possession, Cardiff were stunned to find themselves a goal down and immediately set about clawing their way back.

Earnhaw forced a point-blank save in the 52nd minute and then blasted a left foot effort inches over the bar.

But Bristol's killer-blow arrived some 15 minutes later when Cardiff-born Roberts benefited from Alexander's mistake.

The goalkeeper looked favourite to reach a long-ball from Tony Butler, but the Scotsman completely missed his kick to present Roberts with an open goal to aim at. He made no mistake and the game was effectively won.

Cardiff came close in the dying minute with a Graham Kavangh free-kick and another Earnshaw effort, but Bristol held on as worthy winners.

Cardiff:

Alexander, Croft, Prior, Zhiyi, Barker, Boland, Kavanagh, Hamilton, Legg, Thorne, Earnshaw. Subs: Campbell, Bowen, Maxwell, Collins, Margetson.

Bristol City: Phillips, Bell, Butler, Hill, Coles, Murray, Burnell, Tinnion, Doherty, Roberts, Peacock. Subs: Beadle, Carey, Aaron Brown, Rosenior, Foster.

Referee: A Wiley (Staffordshire)