South Shields stretched their winning run to 13 games in dramatic fashion as a stoppage time goal earned them a 2-1 victory at Chester-le-Street.
The Mariners had to come from behind in the Durham Challenge Cup tie, and a David Foley equaliser, as well as a second goal which could be credited to Foley or Daryll Hall, secured their progression.
They struggled to get going in the first half, though, against a side they had beaten 3-0 in the league seven days earlier.
Andrew Bulford sent an early header over from a long throw, while at the other end, Aaron McEwen fired over.
McEwen had a glorious opportunity to open the scoring on the half hour mark as Ben Johnson’s ball across the box found him, but he shot well over the bar.
Scott Heslop handed the hosts the lead five minutes before half-time when he turned in a terrific cross from the left by Craig Mickle after a swift Cestrians counter-attack
Bulford sent a shot over the bar on the stroke of half-time after being picked out by Jonny Wightman, and Shields started the second half purposefully.
They were handed an immediate reward just 35 seconds in when a penalty appeal was waved away and the ball broke to Foley, who rolled it home.
Julio Arca was then introduced from the bench and his first involvement was to loft a tremendous ball through for Foley, who was denied by a superb fingertip save by Aiden Ames.
Hall went close 15 minutes from the end when Ben Riding’s long throw was headed to him just outside the box, and his left-foot volley was tipped over by Ames.
Barrie Smith was also denied by the fingertips of Ames as he pushed a 25-yard piledriver onto the bar, while Foley had a low volley diverted wide as the game ticked into stoppage time.
A minute into it, Arca delivered a corner from the left which Hall sent towards goal, and it was not clear whether Foley got a touch on the ball as it trickled in to spark scenes of joy.
The Mariners face another vital cup tie on Friday as they travel to Bishop Auckland in the FA Vase.
SOUTH SHIELDS: Young, Galpin, Turner, Hall (c), Riding, Smith, Wightman (Arca 56), Briggs, Bulford (Phillips 68), Ramsey, Foley. Subs not used: Pocklington, Curry, Byrne.
Goals: Foley (46), Hall (90+1).