Dee Okojie scored the penalty as Hastings beat Harrogate to book an FA Cup third-round tie at Middlesbrough.
The Isthmian League Premier side went ahead through Lee Carey's penalty after Matt Bloomer had fouled Zac Attwood.
Harrogate had to wait until the 89th minute to level as Tom Platt bundled the ball in from Dave Merris's cross.
The two sides could not be separated after five penalties each and, after Lee Elam missed for Harrogate in sudden death, Okojie won it for Hastings.
The two sides had drawn 1-1 in the original game with Jamie Crellin's second-half goal earning a replay for Hastings.
The hosts - the lowest-ranked team left in the competition - went ahead through Carey's spot-kick.
But Hastings goalkeeper Matt Armstrong-Ford misjudged Merris's cross to allow Platt to force extra-time.
Both sides scored four of the initial five penalties, but Okojie kept his nerve to ensure a money-spinning third-round tie for the Isthmian League Premier minnows.
Live Text Commentary
Dee Okojie scores a penalty. Hastings Utd 5-4 Harrogate Town on penalties.127:11
Spot kick missed by Lee Elam.126:25
Spot kick missed by Danny Ellis.126:03 Penalty
Luke Dean scores a penalty. Hastings Utd 4-4 Harrogate Town on penalties.125:12 Penalty
Zac Attwood scores a penalty. Hastings Utd 4-3 Harrogate Town on penalties.124:38 Penalty
Penalty scored by Liam Hardy. Hastings Utd 3-3 Harrogate Town on penalties.123:53 Penalty
Penalty scored by Lee Carey. Hastings Utd 3-2 Harrogate Town on penalties.123:18 Penalty
Jonny Allan scores a penalty. Hastings Utd 2-2 Harrogate Town on penalties.122:38 Penalty
Penalty scored by Matt Whitehead. Hastings Utd 2-1 Harrogate Town on penalties.121:39
Spot kick missed by Tom Platt.120:59 Penalty
Jack Dixon scores a penalty. Hastings Utd 1-1 Harrogate Town on penalties.120:03 Penalty
Adam Bolder scores a penalty. Hastings Utd 0-1 Harrogate Town on penalties.120:01
All is set for the penalty shoot-out to start.120:00 +1:07
The match is going to penalties.115:52
Corner taken left-footed by Dave Merris, save by Matt Armstrong-Ford.108:51
Effort from the edge of the penalty box by Liam Hardy goes wide of the right-hand upright.107:49
Luke Dean produces a right-footed shot from deep inside the penalty box which goes wide of the left-hand upright.105:24
Danny Ellis takes a shot. Save made by Craig MacGillivray. Outswinging corner taken right-footed by Lee Carey from the right by-line, Adam Bolder makes a clearance.105:01
Second half of extra-time has started.97:27
Free kick awarded for an unfair challenge on Danny Ellis by Luke Dean. Lee Carey crosses the ball in from the free kick.
Danny Ellis takes a shot. Save by Craig MacGillivray. Corner taken by Lee Carey from the right by-line, Sean Ray takes a shot. Save by Craig MacGillivray. Inswinging corner taken by Lee Carey from the left by-line.93:36
Free kick awarded for an unfair challenge on Sean Ray by Liam Hardy. Josh Jirbandey takes the direct free kick.91:33
Effort on goal by Dwayne Samuels from deep inside the penalty area misses to the right of the goal.90:00 +4:46
Normal time is of over and the game goes into extra time.90:00 +3:22
Corner taken by Lee Carey from the left by-line.89:38
Assist on the goal came from Dave Merris.89:38 Goal scored
Goal! - Tom Platt - Hastings 1 - 1 Har'gate T Tom Platt finds the net with a goal from inside the box to the bottom right corner of the goal. Hastings Utd 1-1 Harrogate Town.88:30
Corner taken left-footed by Dave Merris from the left by-line,88:14
Short corner taken by Liam Hardy from the right by-line.85:55
Shot by Dee Okojie from deep inside the penalty area misses to the right of the goal.83:32
Sean Ray gives away a free kick for an unfair challenge on Lee Elam. Free kick crossed right-footed by Luke Dean, Sean Ray makes a clearance.81:38 Substitution
Substitution Dee Okojie joins the action as a substitute, replacing Bradley Goldburg.79:51
Tom Platt fouled by Jack Dixon, the ref awards a free kick. Dwayne Samuels restarts play with the free kick.76:37
Lee Elam fouled by Scott Manning, the ref awards a free kick. Luke Dean takes the free kick.73:22
Free kick awarded for an unfair challenge on Matt Armstrong-Ford by Jonny Allan. Josh Jirbandey takes the free kick.70:56
Dwayne Samuels restarts play with the free kick.70:56 Substitution
Substitution Scott Manning replaces Tom Vickers.70:56
Danny Ellis challenges Tom Platt unfairly and gives away a free kick.70:01 Substitution
Substitution Jonny Allan joins the action as a substitute, replacing Paul Beesley.68:42
Corner taken right-footed by Lee Carey from the left by-line, Sean Ray has a headed effort at goal from close in which goes wide right of the goal.67:52 Substitution
Substitution Lee Elam on for Danny Forrest.62:18
Matt Whitehead concedes a free kick for a foul on Dwayne Samuels. Dave Merris sends in a cross, Matt Bloomer has a headed effort at goal from deep inside the area missing to the right of the target.60:36 Substitution
Substitution Chib Chilaka leaves the field to be replaced by Liam Hardy.57:03
Josh Jirbandey takes a shot. Save made by Craig MacGillivray. Effort from deep inside the area by Zac Attwood misses to the right of the goal.53:43
Inswinging corner taken from the right by-line by Dave Merris.52:37
Matt Bloomer takes a inswinging corner from the right by-line to the near post, clearance by Sean Ray. Corner taken by Dave Merris, Tom Vickers manages to make a clearance.50:55
Shot by Paul Beesley from deep inside the penalty area misses to the left of the goal.48:48
Free kick awarded for an unfair challenge on Lee Carey by Matt Bloomer. Free kick crossed right-footed by Lee Carey from right channel, clearance by Shane Killock. Shot from long range by Jack Dixon misses to the right of the target.46:51
Assist on the goal came from Zac Attwood. Tom Vickers fouled by Tom Platt, the ref awards a free kick. Direct free kick taken by Josh Jirbandey.46:51 Goal scored
Goal! - Lee Carey - Hastings 1 - 0 Har'gate T Lee Carey scores a placed penalty. Hastings Utd 1-0 Harrogate Town.45:51
Matt Bloomer concedes a Penalty for a foul on Zac Attwood.45:01
The referee gets the second half started.45:00 +1:14 Half time
Half Time The referee blows for half time.36:24
Inswinging corner taken by Dave Merris, Shot from inside the six-yard box by Chib Chilaka goes wide right of the target.35:34
Luke Dean has an effort at goal from the edge of the area that misses to the right of the target.35:00
Bradley Goldburg sends in a cross.32:37
Danny Forrest is penalised for a handball. Josh Jirbandey restarts play with the free kick.28:48
Headed effort from inside the penalty area by Paul Beesley misses to the right of the target.27:55
Tom Platt delivers the ball, clearance by Matt Armstrong-Ford.24:47
Corner taken left-footed by Dave Merris, Sean Ray makes a clearance.24:03
The ball is delivered by Danny Ellis, clearance made by Matt Bloomer.21:23
Luke Dean takes a shot. Save by Matt Armstrong-Ford. Dave Merris crosses the ball, Headed effort from deep inside the area by Tom Platt misses to the left of the goal.18:53
Free kick awarded for a foul by Elliott Cox on Dave Merris. Direct free kick taken by Craig MacGillivray.15:42
Free kick awarded for a foul by Lee Carey on Luke Dean. Adam Bolder takes the direct free kick.13:15
Foul by Dwayne Samuels on Danny Ellis, free kick awarded. Free kick crossed right-footed by Lee Carey from left wing, clearance by Adam Bolder.9:18
Unfair challenge on Bradley Goldburg by Matt Bloomer results in a free kick. Lee Carey crosses the ball in from the free kick, save by Craig MacGillivray.5:36
Danny Forrest has an effort at goal from outside the penalty box which goes wide right of the target.4:52
Sean Ray concedes a free kick for a foul on Paul Beesley. Dave Merris takes the free kick.1:46
Corner from the left by-line taken by Lee Carey, Sean Ray takes a shot. Craig MacGillivray makes a comfortable save.0:12
Foul by Chib Chilaka on Matt Whitehead, free kick awarded. Matt Whitehead restarts play with the free kick.0:00
The ref blows the whistle to start the match.
Live data and text provided by our data suppliers