Former Brentford striker Chris Moore grabbed the winner as Dagenham and Redbridge came to Griffin Park and took all three points in a goal-filled London derby.
The Daggers took a first half lead after a well-worked Ben Strevens goal and raced into a three-goal advantage early in the second period.
John Mousinho and Lee Thorpe gave Brentford hope and The Bees piled on the pressure in an attempt to find an equaliser but the ball would not go in the net and the east London side left with the spoils.
The game took a while to get going but the visitors started in a more confident fashion, Strevens had an overhead effort saved by Simon Brown, but Brentford had the first clear sight of goal.
Darius Charles knocked a ball into the box and Daggers' skipper Anwar Uddin made his only mistake of the evening, slipping and presenting the ball to Kevin O'Connor, he fed Charlie Ide, who slipped as he shot and the ball bounced off the bar and away to safety.
The visitors hit the woodwork soon after when Shane Huke let fly from 35 yards, his shot beat Brown but cannoned off the post, Scott Griffiths had a shot blocked by Thorpe but midway through the half Dagenham took the lead.
Moore nipped in behind the Brentford defence, fed Sam Saunders, who found Strevens with a fine cross and the striker powered home a header.
The goal rocked Brentford, Moore had a shot blocked and Adrian Pettigrew and Thorpe both had to make important aerial interventions to deny the visitors.
Brentford boss Terry Butcher made an early change, introducing John Mousinho for Ben Starosta, and the substitution made a difference, Glenn Poole fizzed a shot narrowly wide, Alan Connell fired just over and Sammy Moore hit the bar with a cross from the left.
Mousinho almost made an immediate impact when he raced onto an Ide pass but his shot was blocked and Poole fired another volley over as half time approached.
But straight after the re-start Dagenham looked to have sealed the game with two goals in the first 16 minutes.
The first came from the penalty spot when Thorpe upended Dave Rainford as he looked to get to the by-line, referee Mr Bratt had no hesitation in pointing to the spot and Rainford scored with ease.
Ross Smith headed wide soon after and the game looked won just past the hour mark when Moore beat Pettigrew in a race and slotted home past Brown but Brentford refused to accept defeat.
They pulled a goal back within a minute when Mousinho picked up an O'Connor knock down, cut inside his man and blasted home and for the next twenty minutes Brentford laid siege to the visitors' goal though Danny Foster nearly sealed it at the other end, heading narrowly wide.
Connell miss-hit a shot from a Thorpe nod on, had a shot blocked a curled a free kick narrowly over while Pettigrew volleyed over the top.
The visitors were clearly nervous and when Thorpe headed in a Craig Pead chip to bring it back to 3-2 Brentford felt they could get at least a point from the game.
O'Connor was denied an equaliser by a brilliant Tony Roberts save, the Daggers' stopper turning a header over from point blank range, and Thorpe headed wide.
But Dagenham soon settled and despite a few nervous moments, Connell volleying wide and Karleigh Osborne having a fierce shot deflected away, took the points.
Brentford: Brown; Starosta (sub Mousinho 38 mins), Thorpe, Pettigrew, Charles; Ide (sub Osborne 59 mins), Moore, Pead, Poole; O'Connor, Connell
Subs (not used): Hamer, Smith, Shakes
Dagenham and Redbridge: Roberts; Foster, Smith, Uddin, Griffiths; Saunders (sub Boardman 78 mins), Huke, Rainford, Southam; Moore (sub Taylor 90 mins), Strevens
Subs (not used): Thompson, Sloma, Green
Attendance: 3,662 (288 visiting fans)
Written by Chris Wickham