Brentford’s five match unbeaten run came to an end in South Wales in the most sickening way possible as they conceded a last gasp goal to lose to Cardiff City. The South Wales side scored two first half goals and that looked as if it would be enough to give them the win. The Bees were second best before the break but improved afterwards, particularly after the introduction of Josh McEachran and Jota. Jake Bidwell scored his first Brentford goal to halve the deficit and John Swift poked home an equaliser four minutes from time. But in the final seconds Kenwyne Jones scored his second goal to give the hosts the win.

It was tough for Brentford to take. Cardiff were solid at the back and dominated physically. They counter attacked well after they got in front but once Brentford started to take a grip on the game, thanks to the prompting of McEachran and the innovation of Alan Judge, the home side wilted. The Bees made light of a terrible pitch in the final quarter and were worth their leveller when it came. But they allowed the hosts one final chance and it was enough to give Cardiff the win.

Brentford’s attempts to try and play their normal passing game through midfield were hit from kick off. The pitch was wet on first inspection and had already cut up by the warm-up. Short range passes bobbled awkwardly and anything intricate was difficult to pull off. Cardiff utilised the height and strength Jones and looked to turn the Brentford defence, playing balls over the top and making them face their own goal.

Cardiff took control early on and should have taken the lead when Jones got in behind and met a long ball with his head but the effort lacked power and David Button saved. The home side went closer still moments later when a deep cross was met by Anthony Pilkington but his looping header flicked off the top of the crossbar.

After a slow start Brentford started to build in to the game and when Judge was able to link with Swift, The Bees looked likely to create. Their best attacking opportunities came when Nico Yennaris and Bidwell joined in from full back but the final ball was often not quite up to standard. Judge had a sight of goal when he intercepted a Craig Noone pass, Lasse Vibe made a clever distracting run but the shot was blocked by Matthew Connolly.

Judge had another shot blocked soon after following a nice move but Cardiff took the lead 20 minutes in. The goal was one Brentford should have prevented – a long throw was cleared as far as Noone 15 yards out, his shot didn’t have a lot of power but it squirmed through and Yennaris’ attempt to block or clear just presented it to Tony Watt, who forced it in. The goal came against the run of play but Cardiff grew in confidence and Button was forced to save a long range effort from Joe Ralls soon after.

Brentford looked to respond and started to dominate possession. They had a lot of the ball in Cardiff territory but a well-marshalled home defence made it difficult to create openings. Ryan Woods had a sight of goal from one move but blasted over. The home side were also picking their moments to press and their second goal came when they smothered Brentford in midfield. Swift was forced back and Cardiff broke when he lost the ball – not unfairly according to referee Simon Hooper – with Watt bundling his way past Jack O’Connell, he squared from Jones and the striker scored at the second attempt after Button had made a fine first save.

The goal may have been slightly fortunate, with a couple of lucky bounces but Cardiff were worth their lead and could have made it three when Pilkington cut inside and let fly but his effort was off target. Brentford should, however, have pulled one back before the break. After a move involving four of five players, Bidwell found space on the left and delivered a cross that Vibe met unmarked ten yards out but nodded wide.

That would have given The Bees a lift going in to break, instead Cardiff held the momentum and could have put the game completely out of reach by the hour mark. Pilkington had a shot blocked when a free kick was half cleared and Jones nodded the corner wide. Ralls missed the target with a volley after exchanging passes with Watts soon after. And Button made a superb save from Watts after the striker had got on to a Jones flick and cut inside.

But the game was still just about in the balance going in to the final half hour and Judge sparked Brentford to life again with a superb run that almost set up a chance for Vibe. Jota and McEachran, making his debut, were introduced soon after and Brentford started to take control. McEachran was able to move the ball better than anyone else on a pudding of a pitch and Judge was finding pockets of space to influence the game.

Brentford were applying pressure and pulled a goal back midway through the second half when Bidwell marked his 186th game for the Club with his first goal, nodding home a Judge corner at the far post. And The Bees should have been level two minutes later. Judge played the pass and released Vibe in behind, he raced in on goal and appeared to be clipped by Sean Morrison but referee Hooper did not see a foul and Connolly was able to make a recovery tackle thanks to his partner slowing the striker down.

A Judge free kick was saved by David Marshall and a Bidwell effort from another corner was blocked while Jota cut inside and saw a shot deflect inches wide. Cardiff were threatening on the break – and Button had to save from Joe Mason – but they looked pensive and the home crowd were restless. Brentford also introduced Philipp Hofmann to give them extra attacking impetus in the final ten minutes.

And Hofmann was involved when Brentford levelled. Jota played a ball in to the tall striker and he slipped it to Judge, the low shot was saved by Marshall but Swift followed up to poke home on the stretch and make it 2-2. The Brentford players celebrated in front of almost 400 travelling fans and they appeared to have the momentum to perhaps snatch the win.

But Cardiff responded. Sami Ameobi poked a shot just wide with time running out and with Mr Hooper checking his watch, the hosts won it. Fabio got away down the left and on to a pass to meet his overlapping run, he delivered a low cross that Jones got to with a long leg to turn the ball in and give his team the win.

Cardiff City: Marshall; Peltier, Morrison, Connolly, Fabio; Noone (sub Ameobi 89 mins), Gunnarsson, Ralls, Pilkington (sub Malone 87 mins); Watt (sub Mason 68 mins), Jones

Subs (not used): Moore, Manga, Whittingham, O’Keefe

Bookings: Pilkington (81 mins)

Brentford: Button; Yennaris, Tarkowski, O’Connell, Bidwell; Diagouraga (sub Jota 62 mins), Woods; Kerschbaumer (sub McEachran 62 mins), Judge, Swift; Vibe (sub Hofmann 79 mins)

Subs (not used): Bonham, Colin, Dean, Saunders

Bookings: Diagouraga (42 mins) (fourth of season)

Attendance: 12,729 (387 Bees fans)