Sam Saunders struck a late winner as Brentford picked up three points against Rochdale.
The Bees had gone ahead in the first half through a Gary Alexander penalty but the home side hit back on a soggy Greater Manchester afternoon.
But Saunders expertly finished at the far post inside the final 15 minutes to give the visitors the victory.
The game started in a frantic fashion.
There were a series of chances in the opening ten minutes and both teams came close to opening the scoring.
Stephen Jordan made a vital early interception to stop Alexander turning in a Clayton Donaldson cross and Richard Lee had to save at the feet of Harry Bunn after the Rochdale wide man latched on to poor headers from Toumani Diagouraga and Craig Woodman.
Dave Lucas in the Rochdale goal saved low from a Saunders header before Lee made a pair of vital saves from Nicky Adams and Bunn looped a header on to the top of the crossbar.
Both goalkeepers were in a constant state of readiness in the early stages - Lucas tipped a Donaldson shot over the top, Jonathan Douglas had a shot blocked and Leon Legge headed over.
It seemed a matter of time until the deadlock was broken and it came 11 minutes in when referee Gary Sutton rightly signalled for a penalty when Jordan clattered in to the back of Donaldson.
Alexander took on the responsibility and drilled the spot kick down the middle to give Brentford the lead.
Rochdale reacted well to going behind and Brentford had to be on their mettle defensively, particularly from a series of free kicks and corners that arrived with menace in the penalty area.
Dean Holden narrowly missed the target with an overhead kick, Adams cut inside and shot wide and Lee just about kept out a near post Ashley Grimes clipped effort.
As half time approached, Brentford started to gain a measure of control and had chances to extend their lead.
Lucas kept out a low Alexander effort and Gary Jones made a vital tackle as Douglas prepared to shoot home.
Woodman blocked a powerful Jones effort before Saunders almost finished off a move involving Shaleum Logan, Niall McGinn, Diagouraga and Douglas but shot wide from the edge of the penalty area.
There were fewer chances at the start of the second half - Jones shot wide for the home side before Lucas kept out a powerful Saunders effort and McGinn blasted the re-bound wide.
Donaldson had a shot blocked and Marcel Eger's effort from a corner was scrambled away before the home side equalised 20 minutes in to the second period.
Bunn won a corner on the left side and when Brian Barry-Murphy put the ball in, Marcus Holness rose unchallenged to head in.
Both teams had chances to edge ahead - Logan pulled a shot wide before Lee got down well to save from Bunn.
Brentford regained the lead with 12 minutes remaining - Alexander exchanged passes with Myles Weston and put in a superb cross from the right, Mike Grella flicked it on and Saunders drilled it in first time with his left foot.
Lucas saved a curling Saunders effort soon after before Diagouraga had a shot blocked as Brentford sought to seal the game.
Rochdale offered little by way of response and Brentford eased their way through the final stages to win the game.
Rochdale: Lucas; Holden, Holness, Jordan, Barry-Murphy; Adams (sub Tutte 84 mins), Kennedy, Jones, Bunn (Akpa Akpro 79 mins); Grimes, Bergkamp (sub Ball 56 mins)
Subs (not used): Edwards, Darby
Bookings: Holden (16 mins), Jordan (22 mins), Bergkamp (44 mins)
Brentford: Lee; Logan, Legge, Eger, Woodman; McGinn (sub Weston 70 mins), Douglas, Diagouraga, Saunders (sub Dean 81 mins); Donaldson (sub Grella 70 mins), Alexander
Subs (not used): Bidwell, Bean
Bookings: Alexander (23 mins) (third of season)
By Chris Wickham