Wrexham will need a replay if they are to reach the First Round Proper of the Emirates FA Cup as Jordan Davies saved the Dragons from becoming the victims of an upset.
Marine looked to have the tie in the bag as stoppage time went on following Owen Watkinson's header to give the home side the lead.
However, the feisty affair saw a late leveller via a Jordan Davies free-kick in the fifth minute of stoppage time.
Phil Parkinson made one change to the side that drew 1-1 with Chesterfield as Liam McAlinden replaced Devonte Redmond. Dan Jarvis and Shaun Brisley were nameed on the bench with seven subs allowed in the competition.
Marine began the game as it would go on for 90 minutes, on top. Former Wrexham defender David Raven headed over from a corner after just two minutes. Though it must be said, Wrexham responded a moment later as Aaron Hayden headed the ball towards goal from a Ben Tozer throw, but the keeper made a smart save.
On 13 minutes, the game kicked into gear. Lainton spilled an initial effort before getting to the loose ball, only for striker Niall Cummins to go in very late on the keeper who was already grounded, breaking Lainton's nose and knocking him unconcious. Cummins was given a yellow whilst Tozer was booked for his reaction.
Though they controlled the game, chances were at a premium for both sides. Davies volleyed well over from distance whilst replacement goalkeeper Christian Dibble - making his 50th appearance - made some routine stops. Dibble's best save came two minutes before the break as a daisy cutter looked simple before taking a horrible bobble and almost bouncing over him before he made a superb reflex stop.
Half-Time: Marine 0-0 Wrexham
The second half started with Wrexham much improved but still unable to get a foothold on the match.
A number of bookings were handed out - including one to a Marine coach and Phil Parkinson at the break, but Davies counted himself lucky after a ferocious foul in the middle of the park.
On the hour mark Wrexham almost broke the deadlock, but efforts from Paul Mullin and Liam McAlinden were heroicly blocked.
The opening goal of the game came 12 minutes from time, when a corner was whipped in for the Mariners and Watkinson's strong headed breezed past Dibble.
With an upset on the cards, Wrexham stepped it up, and as the 90th minute ticked over it looked too little too late. That was until Wrexham won a free-kick 25-yards out with Davies over it. He struck it well, touching the bar and post before somehow finding its way in.
Both sides will now face off again in a replay on Tuesday night.
Wrexham Line-Up: Lainton, Hosannah, Lennon, Tozer, Hayden, Reckord, J.Jones, Davies, McAlinden, Hyde, Mullin
Subs: Dibble, Brisley, Jarvis, Redmond, French, Ponticelli, Angus
Marine Line-Up: Passant, Solomon-Davies, Hayde, Howarth, Shaw, Raven, Watkinson, Doyle, Kengi, Cummins, Barrigan
Subs: Roberts, Passant, McNally, Devine, Reilly, Wignal, Chan
Referee: Garreth Rhodes
Attendance: 1,941 (350)
Image: Gemma Thomas