Veteran striker Jon Stead's second half goal sent League Two Notts County into the fourth round of the FA Cup at the expense of Championship Brentford.
The big striker pounced on a slip by left back Ilias Chatzitheodoridis to run on unchallenged and fire an unstoppable drive into the far corner after 65 minutes.
New Brentford signing Emiliano Marcondes almost levelled with an injury time header from Josh McEachran's corner but the Bees' luck was out, and it bounced back off the upright.
Bees boss Dean Smith made eight changes to the side that lost at Wolves in midweek and was punished for his selection by a County side who repeatedly looked to hit them on the counter.
Not even the return against his old club after 18 months of injury for Alan Judge could spur a comeback from the Bees, who were toothless for long spells against a resolute County defence.
The first half was a cat and mouse affair with Brentford building patiently but looking disjointed and lacking any real quality in the final third.
Veteran Magpies striker Stead gave the hosts a warning after just eight minutes when he looped a speculative effort over keeper Luke Daniels and onto the roof of the net.
Two minutes later Brentford were tested down the right flank and only a desperate Josh Clarke clearance denied Stead again.
Brentford centre back Chris Mepham's header from skipper McEachran's free kick was easily saved by Magpies keeper Ross Fitzsimons after 13 minutes as the Londoners struggled to find any killer instinct in the final third.
At the other end Ryan Yates headed Jorge Grant's pinpoint cross well over when he should have hit the target unmarked from close range.
Stead was a thorn in the Bees side and raced through midway through the half, only a well-timed McEachran interception denying him an attempt on goal.
Brentford's new Danish import Marcondes looked lively throughout and fed Neal Maupay on the half hour but Fitzsimons tipped the Frenchman's effort wide at full stretch.
Yoann Barbet thought had had given the hosts the lead almost on half time but his goal-bound header was cleared off the line by Yates.
After the break County started as if Brentford were still in the dressing room, seizing every second ball and pressing forward with intent.
But the visitors' Daniel Jones had to survive a strong penalty shout when he brought a Chatzitheodoridis cross down with both hands in the box, but the ref waved away Brentford protests.
As the game wore on Brentford threw on their first team players and Ollie Watkins almost scored with his first touch, but his shot hit the post, bounced back against the keeper and rolled along the line.
Maupay, Florian Jozefzoon and Barbet all forced Fitzsimons into fingertip saves to keep the lead intact, but Brentford's luck was out.
Daniels had to be at his best at the other end as he denied the onrushing Grant with a reflex stop as County dropped deeper and deeper and countered fast, allowing Marcondes to power his late header against the post.
The win means County have now progressed to the fourth round four times in their last six attempts.