Cardiff City's Championship play-off hopes suffered a blow as Scott Hogan's late double earned Brentford victory.
All three goals were scored in the final five minutes, leaving the Bluebirds six points outside the play-off berths with three matches left.
Hogan scrambled home from a corner after Yoann Barbet hit the crossbar, and raced on to Lasse Vibe's pass to double the lead three minutes later.
Sub Kenneth Zohore scored a consolation for Cardiff one minute from time.
The Bluebirds enjoyed the better of the first half, although they tested goalkeeper David Button only sporadically.
Cardiff were confident on the ball and impressive, especially on the counter, but wasted a host of chances.
Anthony Pilkington was the worst offender, shooting wide, over and forcing a save from Button within the opening 30 minutes.
He also had a strong penalty appeal waved away after he tangled with Harlee Dean.
Nico Yennaris had an early effort blocked for Brentford before Josh Clarke's measured cross evaded Vibe by inches.
After the interval, Marshall parried away Alan McCormack's 25-yard shot then kept out the rebound.
Vibe, having combined perfectly with Ryan Woods, could only shoot tamely at Marshall from eight yards out as the hosts began to dominate.
Dean headed wide from a teasing Jake Bidwell free-kick before Marshall saved from Bidwell.
Pilkington forced Button into action in a rare City counter-attack, before Hogan's double.
Zohore made a big impact and, after pulling a goal back for Cardiff, fired over as they piled forward late on in search of a point.
Cardiff City manager Russell Slade told BBC Radio Wales: "The only thing that was missing in the first period from us was a goal.
"In the second period I thought we lost a little bit of control, the game got a little bit open and they looked a bit of a threat on the counter-attack.
"The really disappointing thing was the two Brentford goals.
"The one from the corner was not like us and the second one, two or three little errors have led to them getting a 2-0 advantage."