Match ends, Brentford 2, Derby County 1.
Derby County surrendered top spot in the Championship as they lost 2-1 against mid-table Brentford.
Chris Martin put the visitors in front, converting Craig Forsyth's cross for his 12th goal of the season.
Moses Odubajo's strong run set up a second-half equaliser for Andre Gray, who curled in from the edge of the box.
Striker Gray headed against the post from six yards but the Bees won it with a first-time shot from Stuart Dallas in the fourth minute of stoppage time.
Watford are the new Championship leaders following their home win over Millwall, with Derby now three points adrift in fourth.
Steve McClaren's Rams began the game in second place after being deposed from the summit by Wolves, who drew 0-0 with struggling Birmingham in the day's early kick-off.
Derby dominated early on at Griffin Park, with Simon Dawkins - who scored twice in the midweek League Cup win at Fulham - shooting into the side-netting and a Forsyth cross causing havoc in the home defence.
Another Forsyth centre created the opener for in-form striker Martin, who finished left-footed from six yards out to give the Rams a deserved lead.
|Ruthless Martin nets again for the Rams|
|Chris Martin has scored eight goals in his last eight appearances for Derby.|
A rare Brentford counter-attack saw Jon Toral fire just wide of Jack Butland's post towards the end of the first period.
The Bees levelled four minutes after the interval, with Gray's composed finish ending his seven-week wait for a goal.
Seconds after Gray had nodded against the woodwork, Derby broke quickly and substitute Jordon Ibe was denied by Brentford goalkeeper David Button.
Martin failed to find the net with two headers, both from Cyrus Christie crosses, before Brentford's dramatic winner.
Alan Judge passed to Dallas, who fired into the top corner to give Mark Warburton's side their first victory in four Championship games.
Brentford manager Mark Warburton on match-winner Stuart Dallas: "He has done exceptionally well for us. His fitness levels are improving and he is learning how to handle the Championship. All he wants to do is score goals so he has a big smile on his face now.
"We've made out intentions clear on how we want to play from the outset so I'm delighted that this result once again sends out a powerful message in loud voices to the division."
Derby manager Steve McClaren: "It's usually us who score at the end, so we will have to go away, lick our wounds and see a reaction on Tuesday.
"We started so well and were passing the ball around nicely, but in the second half we wanted to run with it and have too many touches and that allowed Brentford back into the game."
- 8DouglasBooked at 90mins
- 17ToralSubstituted forDallasat 66'minutes
- 18JudgeBooked at 90mins
- 23JotaSubstituted forPritchardat 66'minutes
- 19GraySubstituted forProschwitzat 75'minutesBooked at 90mins
- 5BuxtonBooked at 53mins
- 4BrysonSubstituted forHughesat 58'minutes
- 33MascarellBooked at 90mins
- 11RussellSubstituted forCouttsat 78'minutes
- 9MartinBooked at 83mins
- 7DawkinsBooked at 60minsSubstituted forIbeat 63'minutes
- Carl Berry
- Shots on Target
Second Half ends, Brentford 2, Derby County 1.
Alan Judge (Brentford) is shown the yellow card.
Omar Mascarell (Derby County) is shown the yellow card for a bad foul.
Alan Judge (Brentford) wins a free kick in the defensive half.
Foul by Omar Mascarell (Derby County).
Attempt blocked. Omar Mascarell (Derby County) right footed shot from outside the box is blocked.
Jonathan Douglas (Brentford) is shown the yellow card for a bad foul.
Foul by Jonathan Douglas (Brentford).
Jeff Hendrick (Derby County) wins a free kick in the attacking half.
Goal! Brentford 2, Derby County 1. Stuart Dallas (Brentford) right footed shot from the left side of the box to the top left corner. Assisted by Alan Judge.
Attempt blocked. Cyrus Christie (Derby County) right footed shot from the right side of the box is blocked. Assisted by Paul Coutts.
Nick Proschwitz (Brentford) is shown the yellow card.
Foul by Nick Proschwitz (Brentford).
Jake Buxton (Derby County) wins a free kick in the defensive half.
Corner, Brentford. Conceded by Cyrus Christie.
Delay over. They are ready to continue.
Delay in match Richard Keogh (Derby County) because of an injury.
Nick Proschwitz (Brentford) wins a free kick in the defensive half.
Foul by Omar Mascarell (Derby County).