Hartlepool United's FA Cup run is over after a Gillingham late show ensured the Kent side's progression after extra time.
Pools came within 15 seconds of a second round trip to Slough but a late Tom Eaves penalty, then Luke O'Neill and a Elliott List winner dumped Matthew Bates' men out.
Carl Magnay and Paddy McLaughlin put Pools in control in the first half but they were pegged back by Max Ehmer just after the break before Eaves, O'Neill and List struck.
Tyrone O'Neill got a late consolation.
On the selection front boss Bates made three changes from the side beaten by Barnet on Sunday.
In came skipper Andrew Davies at centre half along with Carl Magnay, who both returned from suspension, while Marcus Dinanga was also handed a start up top.
As had been the case in the first encounter between these sides, Pools weathered an early storm but came on strong having soaked up the Gills' pressure.
Eaves might be top of the goalscoring charts in League One but he could not get the better of Scott Loach within 90 seconds - the former England call up got down low to deny the frontman.
At the other end, as they did at Priestfield, Pools carried a real threat. Ryan Donaldson saw a header saved by the huge frame of Tomas Holy before Magnay popped up to open the scoring.
After 22 minutes a deep ball by Liam Noble beat Holy with the flight and Magnay was on hand at the back post to nod home.
With the visitors shell-shocked, Pools capitalised, showing a ruthless streak so rarely seen in league action this season.
Paddy McLaughlin reacted quickest after an error by the Gills keeper to guide home with his left foot for 2-0.
Deservedly ahead at the break, Pools threatened to press the self destruct button again on 50 as Ehmer halved the deficit but they continued to carry a threat in the final third - they could have won by a more handsome margin had substitute O'Neill tucked home when set free late one.
But as the pressure began to build, Pools crumbled in the final minute of added time as a clear handball in the area presented Eaves with the chance to score from the spot. He made no mistake as the game went to extra time.
That goal was like popping a bubble at the Vic, and while Bates threw caution to the wind in extra time by throwing Niko Muir into the mix and going back to two up top, O'Neill and List bagged goals in the 30 minutes on the end of the encounter. Boro younsgter O'Neill twisted and turned to dig out a consolation but the visitors held on.