Doncaster Rovers booked a place in the FA Cup Fourth Round with a last gasp 1-0 win against Brentford.
The Bees more than matched their Championship opponents for most of the evening but James O'Connor struck an 87th minute winner to send the Yorkshire side through.
It was harsh on Brentford, who deserved a replay and had chances to win the tie.
The visitors raced out of the blocks, looking to emphasise the division difference, between the teams, and but for poor finishing they could have all but ended the contest in the first seven minutes.
The first opening came inside the first 20 seconds when James Coppinger picked up a long ball that eluded Leon Legge and turned past Alan Bennett, he squared it to Billy Sharp who turned but blazed wide from eight yards.
Sharp had another opening two minutes later when Coppinger again fed him but he shot wide from 15 yards with only Lewis Price to beat.
Dean Shiels shot into the side netting after racing into the box soon after but Brentford began to assert themselves, with Legge and Bennett taking a no-nonsense approach and Marcus Bean and Kevin O'Connor getting to grips with Doncaster's midfield.
Sam Wood had a low shot saved by Neil Sullivan and the goalkeeper was in action again to gather a Charlie MacDonald header from a Myles Weston cross, although the striker's effort lacked power.
Wood went close again soon after with a fine run from deep, he accelerated through the midfield but his shot was blocked by Doncaster's O'Connor.
Ben Strevens headed wide for Brentford and Mark Wilson fired a pair of efforts well over as the game settled down after the frantic start.
But following a slight mid-half lull the game exploded again towards the end of the first 45, with chances at both ends - although Doncaster had slightly the better of it.
Wood headed another Weston cross wide before Price saved well from Brian Stock and did even better to save low to his right from a fierce Sharp effort.
Sharp had another golden opportunity when he was played through by Wilson, he slipped past the onrushing Price but, under pressure from Bennett, steered his shot wide.
Weston, who was tormenting James Chambers on the right of Doncaster's defence, could have given The Bees the lead with seconds of the half remaining but his dart into the box was halted by Sullivan saving at his feet.
Brentford started the second period brightly and Sullivan saved a bobbling Wood effort before John Oster curled a free kick straight into the wall at the other end.
With the industrious Wood and speedy Weston on the flanks Brentford were well in the game as it approached the hour mark, although they had to be wary of the talent Doncaster possessed in the final third.
And as the minutes ticked on Brentford began to look like the team most likely to win the game - Ryan Dickson headed wide and Wood blasted wide from the edge of the box while Shiels missed the target with a low shot at the other end.
With a replay looming both sides went looking for the winner and Price had to make a fine save to deny Stock, who fired a shot through a crowd of bodies from a Coppinger short corner.
Coppinger and Shiels both fired efforts wide as the game swung the visitors' way in the dying minutes and they put Brentford under real pressure.
But just when it had seemed The Bees had weathered the storm Rovers snatched the tie, and a place in the Fourth Round.
Coppinger's floated a corner to Stock on the edge of the box, his miss-hit volley fell perfectly for central defender O'Connor to head in from close range.
Shiels and Coppinger brought saves from Price as Doncaster looked for a killer second and they were almost pegged back at the death.
Weston floated a cross to the far post where Leon Legge, being used as an emergency striker, had a header blocked, it fell to substitute Sam Saunders who miss-hit an effort wide from close range.
Brentford: Price; Foster, Legge, Bennett, Dickson; Wood (sub Saunders 90 mins), Bean (sub Hunt 90 mins), O'Connor, Weston; MacDonald, Strevens
Subs (not used): Moore, Ferrell, Phillips, Osborne, Bostock
Doncaster Rovers: Sullivan; Chambers, O'Connor, Shackell, Roberts; Oster (sub Hayter 71 mins), Wilson, Stock (sub Hird 87 mins), Shiels (sub Spicer 90 mins); Coppinger, Sharp
Subs (not used): Smith, Guy, Heffernan, Webster
Attendance: 2,883 (277 away fans)
By Chris Wickham