Wrexham Youth progressed into the second round of the FA Youth Cup with a tense penalty shootout victory over Salford Youth on Tuesday night.
The Reds were 2-0 up and seemingly cruising by the early stages of the second-half, thanks to goals from Dan Stephens and Niall Freeman, but the visitors replied with two quick goals from Clayton Gorman and Harry Hatton.
And after a frustrating period of extra-time and a nervy penalty shooutout, it was Wrexham that progressed into the next round of the competition to face either Tranmere or Blackburn.
Wrexham began the game on top, controlling possession and dictating the tempo, but it was the visitors that created the first chance when Gorman met a low cross and saw his shot blocked.
Salford had a bright spell of their own following the opportunity, with the lively, pacy Emmanuel Ogunrinde causing problems on the right-hand side.
The away side were dogged and well organised, allowing Wrexham little time on the ball and pressing with energy when out of possession.
But the Reds had grown into the game as the half progressed and were beginning to ask questions of the Salford defence.
There were signs that the home side were starting to assert their authority on the tie and five minutes before the break they were nearly ahead after a headed corner was cleared off the line.
Moments later they did take the lead, Cameron McGregor striking a free-kick against the bar which was followed up and converted from yards out by Stephens.
That was the last action of a half that had at times been fairly insipid, although Wrexham had significantly improved in the latter stages.
The lead was quickly doubled after the break when Freeman met a low cross and fired past Marcel Wusiewicz in the 49th minute.
Wrexham had picked up where they left off in the first half and appeared to be in full control following the second goal, but five minutes later Salford pulled one back with a coolly placed finish into the far corner from Gorman.
And in the 58th minute they were level, Hatton tapping home from close range after a counter attack to complete a quick and unexpected turnaround.
The two goals had come from nothing and disrupted Wrexham, and they could have fallen behind when Ogunrinde was sent through but hit his effort straight at Dane Rigby.
The game grew increasingly scrappy as extra-time loomed and chances dried up for both sides, the players tiring after a combative second-half.
But there was still time for Salford to give Wrexham a late scare on Halloween with a quick burst down the left and a shot which flew just wide of Rigby's post.
Extra-time was required with the scores still level, and the Reds were given an opportunity late in the first 15 minutes to take the lead from the spot. But McGregor's penalty was superbly saved by Wusiewicz to deny the hosts.
Wrexham continued to search for a winner and came close on numerous occasions in an end-to-end second-half of extra time. But, ultimately, McGregor's missed penalty meant the tie would be decided by a penalty shootout.
It fell to full back Dan Stephens to take the decisive penalty after his teammates had all converted theirs, and he duly dispatched it to send Wrexham through to the second round.
Wrexham Youth: Rigby, Stephens, Barratt, Beaumont, Williams, McGregor, McHarrie, Thorn, Pilkington (Bickerstaff 85), Freeman, Bulkeley (Sargent 71).
Subs: Kirkham, Allshorn, Cleworth.
Salford Youth: Wusiewicz, Doyle, Foster (Woodcock 88) , Voss (Thompson-Edwards 46), Gorman, Ogunrinde, Adetiloye, Foulds, Hatton, Burrows (Moncrieffe 79), Eadie.
Subs: Barlow, Chukwu.
Referee: David Croft (Merseyside)
Wrexham: Williams (63, foul), Barratt (89, foul)
Salford: Adetiloye (42, foul), Foulds (72, foul), Hatton (90+1 foul), Wusiewicz (104, dissent), Ogunrinde (111, foul)
Photographs courtesy of Alun Roberts (AJAR Photographics)