Huddersfield Town pulled off a smash and grab raid as they struck with seconds remaining to win 1-0 at Griffin Park.
It looked as if the spoils would be shared in a 0-0 draw that Brentford would have been slightly disappointed with.
The Bees will feel they had the better of it, they had more possession and dominated territorially.
Huddersfield goalkeeper Alex Smithies was probably slightly the busier but neither team could break through until Peter Clarke scored for The Terriers in stoppage time to win it.
The first 20 minutes were fairly even, Huddersfield started brightly but Brentford had the upper hand as the first half reached its midway point.
Jordan Rhodes went close early on for the hosts with a header that Richard Lee saved well and the same two players were involved moments later when the striker curled an effort from 18 yards that the Brentford goalkeeper turned away at full stretch.
Gary Roberts had a shot blocked for the visitors after twisting his way past two men before Gary Alexander had Brentford's first effort on goal - a low left foot shot that fizzed wide.
Lewis Grabban shot wide at the near post and then fired weakly at Smithies from 20 yards after beating two men.
Kevin Kilbane fired a free kick into the defensive wall for Huddersfield but Brentford were starting to gain the upper hand.
Smithies was lucky to see a Nathan Byrne effort deflect into his arms and Peter Clarke made an important defensive challenge when Grabban reached an Alexander nod down.
Alexander headed wide from a corner before Adam Reed came within a whisker of opening the scoring with an effort that curled inches wide from 15 yards after a brilliant turn on the edge of the penalty area had taken two defenders out.
Huddersfield ended the half strongly - after a switch in formation so they had just one striker - but there were few late chances and Brentford would have gone in at the break feeling they had the better of it.
Rhodes was withdrawn at half time as The Terriers sought to solidify their 4-5-1 system but Weston had the first sight of goal after the break, drawing a fine low save out of Smithies with a fierce shot.
Weston was unable to turn home a Grabban cross and Grabban shot weakly at Smithies after good work by Byrne soon after.
Roberts curled a free kick wide for the visitors but although lone front man Benik Afobe was working hard, he wasn't getting much of the ball.
Weston volleyed over for Brentford after picking up an Alexander nod down while Joey Gudjonsson missed the target with an overhead effort soon after.
There were fewer chances after half time, Huddersfield's five-man midfield enabled them to be solid defensively, albeit Brentford had more of the ball and the territorial advantage.
Danny Ward curled an effort well off target for Huddersfield while at the other end Jeffrey Schlupp, who had only been on the pitch for four minutes, fired straight at Smithies from ten yards after good work by fellow substitutes Nichols Bignall and Marcus Bean.
Jamie McCombe headed into the side netting late on for Huddersfield but there were fewer and fewer chances as time ticked on.
But when Huddersfield got their opportunity they took it emphatically.
A corner came in and although Lee saved his first effort, and Danny Cadamarteri was unable to force the ball in, Peter Clarke lashed it into the net to win it for the visitors.
Brentford: Lee; O'Connor, Legge, Osborne, Woodman; Byrne, Diagouraga, Reed (sub Bean 77 mins), Weston (sub Schlupp 77 mins); Alexander, Grabban (sub Bignall 66 mins)
Subs (not used): Moore, Wright, Spillane, Tudur Jones
Huddersfield Town: Smithies; Hunt, P. Clarke, McCombe, Jordan (sub Naysmith 59 mins); Roberts, Gudjonsson, Kilbane, Arfield; Rhodes (sub Ward h/t), Afobe (sub Cadamarteri 73 mins)
Subs (not used): Colgan, T. Clarke, Lee, Novak
Attendance: 4,402 (633 away fans)
By Chris Wickham