Last updated on .From the section Football

Alex Revell celebrates his goal against Brentford - his sixth of the season

Cardiff City came back from a goal down to beat play-off hopefuls Brentford despite ending the match with nine men.

Bees striker Andre Gray gave his side the lead when he tapped in after Cardiff keeper Simon Moore failed to hold on to an Alex Pritchard free-kick.

Federico Macheda slotted in a leveller after a defensive mix-up by Brentford and Alex Revell chipped Cardiff ahead.

Cardiff's Kadeem Harris received a straight red on 77 minutes and Macheda was sent off for two bookings late on.

Harris was dismissed for a challenge on Alan Judge, while a rash challenge from Macheda in the 90th minute earned him a second yellow card and his marching orders.

Brentford tried to take advantage but were denied by the visitors' resolute defence and remain sixth.

The Bees will be left ruing their failure to open up a four-point gap over seventh-placed Ipswich, who lost 4-1 to Middlesbrough earlier in the day.

Gray's 13th league goal of the season gave them an advantage after an error from Moore, who atoned by saving from Pritchard later on.

A collision between Brentford goalkeeper David Button and home centre-back Harlee Dean then allowed Macheda to slot in an equaliser.

Button was also caught out when he failed to intercept a through-ball and was caught off his goal-line as Revell capitalised by lofting the ball over him for the winner.

Cardiff manager Russell Slade:

"It was an interesting game. I didn't think it would explode into life like it did in the second half.

"Brentford were better in the first half and deserved their lead but the important thing is that we stayed in the game, got the next goal and then an excellent finish from Revell got us in driving seat."

Brentford manager Mark Warburton:

"I'd like to have seen us try to unpick them with a little more though in the final few minutes instead of lifting balls into their box because we know we have the technical ability to do that.

"We knew that Cardiff would come and try to break the tempo, slow things down and delay but we have to deal with that and keep playing our football. We were good for the 1-0 and dominated the game but two lapses have cost us."