Brentford were knocked out of the FA Cup with Budweiser at the Second Round stage by Carlisle United at Brunton Park.
The Bees looked as if they would take control of the game when a Pascal Chimbonda own goal on the hour mark levelled it up after Carlisle had taken the lead in first half stoppage time.
But Lee Miller scored twice in four minutes to give Carlisle a lead they did not relinquish.
Farid El Alagui headed a late goal for The Bees and they pressed hard for an equaliser but Carlisle held on.
Brentford probably deserved a replay on the balance of play; the first half was even, although Richard Lee in the visitors’ goal was made to work a little harder than counterpart Greg Fleming.
And in the second period Brentford dominated until they equalised.
However, Carlisle responded well, scored twice in their main spell and did enough to get over the line.
For long periods of the first half it looked as there may not be one goal let alone five.
Marcello Trotta tested Fleming early on and Courtney Meppen-Walter fired just over from distance for the home side as the game started to come to life after a slow start.
Lee made a wonderful save to keep out a Sean O’Hanlon header and Miller was unable to turn in the rebound before Tony Craig made a vital block to deny David Amoo.
At the other end O’Hanlon made a fine tackle to stop Trotta pulling the trigger after good work by Clayton Donaldson, an Alan McCormack shot was blocked and Trotta flicked a Jake Bidwell free kick just wide.
Carlisle had a good spell around the half hour mark and stretched The Bees, a Paul Thirlwell shot was blocked before Bidwell threw himself in the way of a James Berrett shot, when the midfield man looked set to slot home an Amoo cross from ten yards, and Miller missed the target with an acrobatic effort.
Lee then pushed a Tom Lawrence free kick around the post.
But Brentford weathered that storm and seemed to have the upper hand as half time approached.
George Saville was just unable to turn in a McCormack cross and Will Grigg turned it wide when it reached him at the far post before Fleming saved from Donaldson.
When it seemed as if the score line would be blank at the break, Carlisle struck.
Lawrence got away on the left and fed it inside to Amoo, he set up Berrett and the midfield man drilled a shot in to the top corner from 20 yards.
The goal, in the dying seconds of the half, gave Carlisle a slightly unjust lead at the break and Brentford came out for the second period determined to put it right.
A Trotta shot deflected inches wide and just out of the reach of Donaldson before Craig headed the resulting corner wide.
Grigg had a great chance when Toumani Diagouraga found him in the inside right channel, with only Fleming to beat he fired wide at the near post.
A low McCormack shot was saved by Fleming with his feet while, at the other end, a rare Carlisle attack saw a Prince Buaben header cleared.
The goal Brentford had been threatening came just past the hour mark.
A reverse pass from substitute Jake Reeves released McCormack inside the penalty area, he drilled the ball across and Chimbonda could do little but turn it in to his own net as he tried to prevent one of four waiting Brentford players scoring.
It seemed as if Brentford had a match-winning initiative but Carlisle responded superbly.
They took the game by the scruff of the net and won it in a four minute spell.
A Berrett free kick flew just past the far post but minutes later the midfield man picked up a header from Miller, as he met a Chimbonda cross, and returned it for the striker to slot home.
It was three minutes later.
Amoo tricked his way past McCormack on Carlisle’s left and darted in to the box.
He was brought down by the recovering Brentford defender and referee Andy Woolmer had little option but to award a penalty.
Miller drilled it low and hard, past Lee and in to the net.
Craig made a block to prevent Miller putting Carlisle out of sight before O’Hanlon headed over.
And minutes later, with five remaining, Brentford were back in it.
Sam Saunders won a free kick with his first touch and then delivered it to the far post for El Alagui to head home.
The Bees then set about getting a leveller.
Harlee Dean headed wide and in stoppage time Fleming saved at the feet of Grigg.
Brentford poured men and balls in to the box as Carlisle tried to hold out.
And after five minutes of stoppage time, Mr Woolmer called things to a halt, ending Brentford’s FA Cup run.
Carlisle United: Fleming; Chimbonda (sub Symington 82 mins), O’Hanlon, Meppen-Walter, Robson; Berrett, Thirlwell, Buaben; Amoo, Miller, Lawrence (sub Potts 64 mins)
Subs (not used): Brass, Noble, Livesey, Roddan, Guy
Bookings: Thirlwell (85 mins)
Brentford: Lee; McCormack, Dean, Craig, Bidwell; Forshaw, Diagouraga (sub Reeves 59 mins), Saville (sub Saunders 84 mins); Donaldson, Trotta (sub El Alagui 68 mins), Grigg
Subs (not used): Button, Logan, Nugent, Fillo
Bookings: Saville (79 mins) (fourth of season)
Attendance: 2,589 (173 Bees fans)
By Chris Wickham