Ten-man Grimsby Town bowed out of the FA Cup with their heads held high after a brave performance against Premier League Crystal Palace at Selhurst Park.
The Mariners were forced to play almost the entire game a man short after Andrew Fox was sent off with just two minutes on the clock after an intervention by the video assistant referee.
But they produced a magnificent effort to hold out in the face of Palace pressure and were just four minutes away from forcing an unlikely replay when their resistance was finally broken as substitute Jordan Ayew settled the contest.
Town boss Michael Jolley made one change to the team that started the home defeat by Mansfield Town on New Year's Day, with Martyn Woolford coming back in as Ben Pringle dropped to the bench.
James McKeown started in goal, with Mitch Rose again beginning at right-back as Reece Hall-Johnson and Luke Hendrie formed the centre-back partnership and Fox lined up on the left.
The midfielders were Elliot Embleton, Harry Clifton, Jake Hessenthaler and Woolford, with Harry Cardwell joining Wes Thomas in attack.
Sebastian Ring was selected as a substitute for the first time since signing for the club and he was joined on the bench by John Welsh, Jordan Cook, Charles Vernam, Pringle, Mattie Pollock and Sam Russell.
Palace's former England manager Roy Hodgson named a strong line-up packed with quality, with England international Andros Townsend and Ivory Coast striker Wilfried Zaha among the biggest names to feature from the start.
A video referee was in action and there was controversy almost from the start after Fox was shown an early yellow card for a foul on Townsend but after the incident was reviewed by referee Martin Atkinson on the advice of the television official, the decision was altered and the left-back was sent off.
What had already been an enormous task for the Mariners and their patched-up defence had become even tougher just two minutes in.
Hall-Johnson had to cleear off the line after a Townsend cross was headed towards goal by Alexander Sorloth on six minutes.
At the other end, Town's first attack of note saw Hessenthaler cross from the left for Thomas but the striker was penalised for handball as he controlled it at the far post.
Jeffrey Schlupp hit the side-netting with a shot from inside the box, before a vital touch from Hendrie stopped Sorloth getting on the end of a low cross.
A foul on Jairo Riedewald by Cardwell gave the hosts a free kick right on the edge of the Town box on 17 minutes but Townsend's shot from it hit the Mariners' wall and the rebound was also blocked.
Despite being a man down, Town were still looking to create chancees where possible and Thomas got in behind the Palace defence when Embleton sent a deep coss over from the left but the striker slipped and could not get on the end of it.
Sorloth shot wide after meeting a low cross on 21 minutes, then McKeown saved from Zaha after the forward had run into the box.
Town then survived three corners in quick succession, with McKeown making another good save from Sorloth after the striker looked to have pushed Woolford.
Schlupp dragged a low shot wide from 20 yards, before a free kick fo a foul on Zaha led to more danger until a strike by Martin Kelly was blocked for a corner.
Kelly was allowed to advance and fire from 25 yards on the half-hour but McKeown was equal to the shot, touching it onto the post before gathering the ball.
Defender Pape Souare had to be replaced after twice going down injured, with Cheikhou Kouyate coming on in his place s the hosts made the first substitution on 36 minutes.
Schlupp had the next chance on 40 minutes, cutting into the box from the Palace left but lifting his shot over the bar.
Town's opportunities had been few and far between but they were given a free kick for a foul on Thomas two minutes before the break. Embleton's delivery was headed away for a corner, which led to an Embleton shot being caught by home keeper Wayne Hennessey.
Hendrie was booked for a foul as the signal was made for two added minutes, before another home corner was caught by McKeown.
The Mariners safely saw out the remainder of the half to get to the break level, which their effots deserved.
No changes were made before the restart and an early Sorloth header dropped wide as Palace were the first to threaten.
A cross from Joel Ward four minutes in was headed away as far as Zaha, who volleyed over the bar.
Hall-Johnson then did well to deny Sorloth and win a goal kick after some trickery from Zaha had seen him make progress inside the Town box.
A foul by Embleton on Zaha brought a free kick in a dangerous position but it did not cause any problems as Max Meyer's shot was deflected through to McKeown.
At the other end, Rose was fouled by Zaha to give Town a free kick on the right edge of the penalty area. Embleton drove it in but Hennessey claimed a comfortable catch.
Another foul on Zaha soon afterwards gave Palace a further shooting chance from a free kick just right of centre but again, the opportunity was not taken as Townsend hit the wall.
The hosts were threatening and they were inches away from taking the lead when a header by Kouyate hit the post and bouncd awy to the safety of a goal kick.
That proved the cue for a second home substitution as striker Connor Wickham was sent on in place of Sorloth.
Townsend sent a 25-yard effort over the bar on 67 minutes as the hosts continued to search for a breakthrough, before Ayew replaced Riedewald in their final substitution.
A purposeful run through the middle from Embleton ultimately went unrewarded, before a foul by Rose on Zaha on the left brought a yellow card, although the resulting free kick caused no problems.
Vernam replaced Thomas for Town with 15 minutes to go, then Townsend curled another shot off-target from 20 yards.
A free kick for a foul on Vernam gave Town an opportunity to create some pressure of their own and it led to a corner as Embleton's ball was headed out.
Clifton fired off-target from long range on 83 minutes, before Scott Dann sent an effort narrowly wide from 20 yards at the other end.
A foul by Rose gave Palace a free kick on the left corner of the Town box with four minutes to go and this time, the pressure finally told as Schlupp's ball was headed into the net by AYEW.
Cook replaced Woolford and the Mariners attacked in search of an equaliser but as the game moved into three added minutes, it was the hosts who were coming forward in a bid to grab a second goal.
Zaha fired over the bar in what turned out to be the last chance of the game as the top division side squeezed through to the fourth round and the Mariners' FA Cup run came to an end.
Town are next in action on Saturday, when Macclesfield Town are the visitors to Blundell Park.
13 Wayne Hennessey
2 Joel Ward
23 Pape Souaré
34 Martin Kelly
6 Scott Dann (C)
44 Jairo Riedewald
7 Max Meyer
15 Jeffrey Schlupp
9 Alexander Sørloth
10 Andros Townsend
11 Wilfried Zaha
1 Julian Speroni
35 Sam Woods
25 Sullay Kaikai
8 Cheikhou Kouyaté
14 Jordan Ayew
29 Aaron Wan-Bissaka
21 Connor Wickham
1 James McKeown (C)
8 Mitch Rose
19 Andrew Fox
2 Reece Hall-Johnson
27 Luke Hendrie
7 Jake Hessenthaler
22 Elliot Embleton
15 Harry Clifton
17 Harry Cardwell
16 Martyn Woolford
39 Wes Thomas
23 Sam Russell
31 Matthew Pollock
3 Sebastian Ring
11 Jordan Cook
30 Ben Pringle
4 John Welsh
18 Charles Vernam
Referee: Martin Atkinson
Attendance: Today's attendance: 19,967 (5,399)