Non-league AFC Fylde came from behind to force a replay against League Two Gillingham following a 1-1 draw at Mill Farm.
Tom Walker struck seven minutes from time to cancel out Mikael Mandron’s opener.
The hosts started brightly with Nick Haughton going close in the first few minutes with a left-footed effort from 20 yards.
The Gills patiently worked their way into the game and were unlucky not to take the lead when Ryan Law’s cross was inches shy of Mandron’s right boot at the far post.
The striker was rewarded for his persistence though when, in the third minute of stoppage time at the end of the first half, he connected with a Will Wright free-kick on the volley to beat Chris Neal low to his left.
The second half was feisty at times as Fylde went in search of an equaliser.
They came close shortly after the hour when Emeka Obi’s header from a corner was well saved by Glenn Morris.
However, their pressure paid off in the latter stages as Walker latched onto a cross from the left wing and struck a first-time effort into the bottom corner.
Morris made a great save late on to deny Haughton and the two sides will meet again at Priestfield.