Two late goals sent Grimsby Town out of the FA Cup as they were beaten by National League Dagenham and Redbridge.
The Mariners, playing a high-energy game, dominated the contest after falling behind to an early goal from Scott Wilson but struggled to find a way past a spirited Dagenham defence.
Town stuck to their task though and were level on the hour when Owen Windsor scored from the penalty spot after Matt Green was brought down inside the box.
The visitors looked to have the initiative from there but could not find a second goal and instead, it was the hard-working hosts who reclaimed their advantage in the last minute when Wilson struck again.
Town went in search of a second equaliser in added time but instead, it was Dagenham who made sure of a place in the second round when Mitch Brundle converted the game's second penalty to make it 3-1.
Danny Preston came back into the Town starting XI as one of three changes from Tuesday's home victory over Barrow.
James Morton and Green were the others coming into the line-up as Terry Taylor, Montel Gibson and Max Wright dropped out.
James McKeown started in goal, with Luke Hendrie, Matie Pollock, Luke Waterfall and Preston forming the defence.
Harry Clifton, Danny Rose and Morton were the midfielders, with Kyle Bennett, Green and Windsor named in attack.
The Grimsby substitutes were Ollie Battersby, Ludvig Ohman, Joe Starbuck, Sean Scannell, George Williams, Taylor and Gibson.
Dagenham came into the game sitting bottom of the National League table, with just one win from their six league games so far, but were looking to cause a cup upset.
Town started brightly, with an early penalty claim waved away by the referee after Green went down under a challenge inside the box.
The Mariners were doing most of the early attacking, with Green forcing a corner on seven minutes before a cross by Windsor proved to be just too far ahead of Green for him to connect with a header.
But when the deadlock was broken on 10 minutes, it was the hosts who took the lead. A long ball forward was headed on by Angelo Balanta for WILSON, who slotted past McKeown and into the far corner of the net.
Town immediately went in search of an equaliser and another strong appeal for a penalty came within a minute. Again, it was Green who went down, this time under a challenge from keeper Elliot Justham, but the result was the same as the referee waved play on.
A home corner on 14 minutes was not fully dealt with after the ball from the flag was flicked on at the near post but it was eventually put out for a goal kick.
A cross from Windsor on the right drifted beyond the far post, before Preston won a corner on the opposite left flank on 18 minutes. Bennett's delivery from the flag was headed away.
At the other end, a corner was headed behind for another one, which was comfortably caught by McKeown.
Town's best chance of the game so far came on 29 minutes, when a good ball saw Green get in behind the Dagenham defence. He made his way into the penalty area and shot but although the effort beat Justham, it also went just past the far post.
A home free kick from Myles Weston on the right beat everybody and went out for a goal kick, before a Windsor cross at the other end was blocked for a corner, which led to a header from Green being tipped over the bar by Justham.
Despite being behind, Town had looked the better side and a great attacking move on 36 minutes saw the ball moved across the pitch before Preston won a corner after getting a pass from Bennett.
The visitors went close soon afterwards when a last-ditch block denied Waterfall from inside the box, before another Mariners corner was headed clear and a chance for Green led to a good save by Justham.
Town were knocking heavily on the door and another corrner from the right led to Waterfall heading over the bar.
A free kick from the right was driven into the box by Rose for Pollock, who could only head off-target, then Wilson was presented with an opportunity for the hosts but pulled his low shot just wide of the far post.
One added minute was played at the end of the half and although it had been dominated by the Mariners, they found themselves still a goal behind at the break.
No changes were made before the restart and Town began the second period on the front foot, looking for an equaliser.
But the first real opportunity of the half didn't come until 10 minutes in, when a foul on Bennett gave the away side a free kick in a central position, a yard outside the box. Bennett's shot from it was caught by Justham.
A better chance was to come just before the hour when a ball from Bennett sent Green in beind the home defence. He was brought down inside the box by Kenny Clark and this time, the referee did point to the penalty spot. WINDSOR stepped up and beat Justham from 12 yards to finally make it 1-1.
The hosts were forced into making the game's first substitution on 66 minutes as Balanta went off with an injury. George Saunders was sent on as his replacement.
A cross from Clifton was blocked for a corner, which was headed wide by Hendrie, before the first Town change saw Williams replace Green.
Chances for the home side had been few and far between in the second half but they did create an opportunity on 69 minutes, although Sam Deering's low shot from 18 yards went straight through to McKeown.
Williams hit the home wall with a free kick from 30 yards on 70 minutes as Town looked for what could be a winning goal.
But they were inches away from falling behind again two minutes later. Mitch Brundle made a good interception in midfield and the ball was played to Deering. He found Wilson and the striker shot from the edge of the box but his effort bounced off the post and out for a goal kick.
Defender Will Wright did well to win the ball ahead of Williams as he looked to meet a ball into the box from Windsor.
Town's next chance came on 80 minutes and saw Clifton cut into the penalty area from the right before hitting a low shot which keeper Justham got down to stop.
Gibson replaced Windsor in the Grimsby attack for the last 10 minutes, before Abu Ogogo became the first of the game to be shown the yellow card when he brought Clifton down from behind, midway inside the Dagenham half. Bennett's delivery into the box was not dealt with and the ball dropped for Williams, whose shot was deflected over the bar for a corner.
Charlie Adams replaced Ogogo for Dagenham with six minutes left and extra time starting to loom.
The hosts won a corner on the right soon afterwards but the ball from the flag was headed clear, before a follow-up cross was caught by McKeown.
At the other end, Williams played a great, low ball across the six-yard line but nobody in black and white could get to it.
Scannell was sent on in place of Rose as Town made their third and final substitution on 88 minutes and the hosts went close soon afterwards when Saunders fired just wide after a cross from Deering.
A Town corner was well-defended as both sides continued to look for a winner inside normal time, before Hendrie shot wide from distance.
Brundle blasted over the bar after Wilson and Deering had created an opening for the hosts after a Town mistake gave them possession.
But after getting away with that error, the Mariners were punished for another one soon afterwards when the hosts reclaimed the lead as the game moved into added time. A mistake by Morton on the edge of his own box gave away possession and after the ball was played to WILSON, he took a touch before firing past McKeown.
Wilson was replaced by Darren McQueen for the closing stages of the game as Town pushed forward in search of a second equaliser to rescue the contest.
But the hosts were given the final say as Weston was brought down inside the penalty area and after the referee pointed to the spot, BRUNDLE stepped up to make it 3-1 and settle the issue once and for all.
Town are next in action on Tuesday, when they host Leicester City under-21s in the newly-renamed Papa John's Trophy.
Dagenham & Redbridge
- Elliot Justham
- Will Wright
- Elliott Johnson
- Luke Croll
- Kenny Clark
- Mitch Brundle
- Myles Weston
- Abu Ogogo (C)
- Sam Deering
- Angelo Balanta
- Scott Wilson
- Joshua Strizovic
- Bailey Clements
- Andrew Eleftheriou
- Charlee Adams
- George Saunders
- Jaden Thompson-Brissett
- Darren McQueen
- James McKeown (C)
- Luke Hendrie
- Danny Preston
- Matthew Pollock
- Luke Waterfall
- Danny Rose
- Harry Clifton
- James Morton
- Matt Green
- Owen Windsor
- Kyle Bennett
- Ollie Battersby
- Ludvig Öhman
- Sean Scannell
- Joseph Starbuck
- Terry Taylor
- George Williams
- Montel Gibson
Referee: Craig Hicks
Next Up: Leicester City (H)