Brentford will play Chelsea at home in the FA Cup fourth round after the League One side knocked out League Two's Southend.
Paul Hayes opened the scoring, heading home a first-half left-wing cross.
Southend keeper and former Bee Paul Smith was in inspired form, pulling off a string of saves including a penalty from Harry Forrester.
Barry Corr equalised for the Shrimpers before Smith was eventually beaten by Clayton Donaldson's deflected shot.
It was cruel on Smith, who was by far the man of the match at Griffin Park, but anything less than victory for the Bees would have been a travesty.
They threw everything at the visitors and should have been 2-0 up inside the first 16 minutes.
First Forrester hit the crossbar with a shot from 25-yards out before he forced Smith into his first save of the night.
Smith, who spent four years at Griffin Park, could do nothing to stop the opening goal though when Hayes was on the end of a left-wing cross from Lee Hodson and tapped home from close-range.
Southend finally created a chance when Anthony Straker saw his header tipped against the post and then put the rebound wide.
More chances followed for the home side before Donaldson was bought down in the penalty area by another former Bee Mark Phillips.
Forrester stepped up but unsurprisingly his effort was saved by Smith.
Paul Sturrock's side got back on level terms against the run of play when Corr headed home from close-range in the 69th minute, but just seven minutes later they were behind again.
Brentford, who had 29 shots on target, finally breached Smith's defences when Donaldson scored his 18th goal of the season, courtesy of a deflection off Luke Prosser.
VIEWS FROM THE DRESSING ROOM
Southend manager Paul Sturrock told BBC Essex:
"The best team won, that's obvious. They are a very, very good side and they proved that.
"Our opportunity in the last game was there for all to see, we didn't take our chances in that game and we paid the penalty tonight.
"It's not very often you play that kind of standard of team, they were terrific in the first half.
"(Paul Smith) played for them, he had something to prove. There were too many shots going in from all over the pitch."