Mansfield Town earned an FA Cup third-round home tie against Liverpool courtesy of Louis Briscoe's late winner against Lincoln City at Field Mill.
Paul Cox's Stags went in front thanks to an early own goal from Imps keeper Paul Farman.
Stags old boy Adam Smith's lob levelled the tie five minutes before the break.
But Anthony Howell fed Briscoe to fire home from 12 yards on 77 minutes to set up a lucrative home clash with the seven-times Cup winners on 6 January.
Mansfield Town v Liverpool, Sunday 6 January (16:00 GMT)
- Mansfield Town have been paired with Liverpool just once before in their 115-year history.
- The two teams played each other in the League Cup in September 1970.
- Bill Shankly's side were held 0-0 at Field Mill, before winning 3-2 in the replay at Anfield.
An inflatable cover, under which hot air was blown onto the playing surface, ensured that the game went ahead as scheduled at Field Mill.
If that was down to good planning, Mansfield's next slice of good news was down to good fortune when they went ahead on 14 minutes.
John Dempster's header from Chris Clements' free-kick looped over Farman before hitting the base of the post and deflecting back into the net off the Lincoln keeper's shin.
But Smith levelled five minutes before the break when, from Daniel Gray's long kick forward, he showed excellent poise to lob the awkwardly bouncing ball over stranded home keeper Alan Marriott.
Former Mansfield manager David Holdsworth had rested eight of his players for Saturday's 4-2 Blue Square Bet Premier win at Dartford in the hope of keeping them fresh.
But it was Mansfield who lasted the pace better and, with the tie just 13 minutes away from extra time, Howell's square ball across the box set up the bustling Briscoe to blast the winner.
VIEWS FROM THE DRESSING ROOM
Mansfield Town manager Paul Cox told BBC Radio Nottingham:
"It's just out of this world, it's quite a surreal moment. At 1-1, especially in the first half I thought Lincoln were the better side but we made a couple of changes and it tipped in our favour.
"It's just a great strike from Louis Briscoe that's taken us through, so out of this world. I thought the lads were excellent and the support was absolutely immense."
Lincoln City manager David Holdsworth told BBC Radio Lincolnshire:
"I'm really disappointed for the players and our supporters. We've been the better side for the majority of the game. They had the first half-hour when we were a little nice at times but after that there was only one team in it.
"I'm pleased for Adam Smith, who scored his first goal for the club, but half-time really came too soon because we were fully in control of the game. We asked for more of the same at half-time and we got that, the chances came along and we've been punished for not taking them.
"We've given our all and done everything we can to try and be victorious but sadly it wasn't to be tonight. We've got to get the players' heads back up and have that fighting spirit again.
"We've got character, honesty, integrity and desire and I'm proud of them. Not one of them's given anything other than 100% and that's all we can ask."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee signals the end of the game.90:00 +2:50
Foul by Matt Rhead on Daniel Gray, free kick awarded. Paul Farman restarts play with the free kick.90:00 +2:12
Short corner taken by Anthony Howell.90:00 +1:45
Jamie Taylor sends in a cross, save by Alan Marriott.87:45
Anthony Howell fouled by Mamadou Fofana, the ref awards a free kick. Alan Marriott takes the free kick.87:05
Foul by Ritchie Sutton on Conner Robinson, free kick awarded. Direct free kick taken by Paul Farman.85:37
Foul by Vadaine Oliver on John Dempster, free kick awarded. Direct free kick taken by Alan Marriott.85:37 Substitution
Substitution Conner Robinson on for Jake Sheridan.85:37
Free kick awarded for a foul by Lindon Meikle on Vadaine Oliver. Daniel Gray takes the direct free kick.82:32
Chris Clements takes the direct free kick.82:32 Booking
Booking Alan Power receives a caution for unsporting behaviour.82:22
Alan Power concedes a free kick for a foul on Chris Clements.80:52
Corner taken right-footed by Alan Power, Jamie Taylor takes a shot. Save by Alan Marriott.79:51 Substitution
Substitution Colin Larkin joins the action as a substitute, replacing Adam Smith.79:51 Substitution
Substitution Vadaine Oliver replaces Gary Mills.77:59
Foul by Jamie Taylor on Alan Marriott, free kick awarded. Alan Marriott restarts play with the free kick.76:03
The assist for the goal came from Anthony Howell.76:03 Goal scored
Goal! - Louis Briscoe - Mansfield 2 - 1 Lincoln Goal scored by Louis Briscoe from inside the penalty area to the top right corner of the goal. Mansfield 2-1 Lincoln City.75:05
A cross is delivered by Matt Green, Tom Miller manages to make a clearance.73:18
Chris Clements takes a shot. Save by Paul Farman.
The ball is swung over by Chris Clements, Tom Miller manages to make a clearance.72:25
The ball is crossed by Daniel Gray, Headed effort from close range by Jamie Taylor goes wide left of the target.70:03
Andrew Boyce concedes a free kick for a foul on Matt Rhead. Chris Clements crosses the ball, Header by Matt Rhead from deep inside the penalty area misses to the left of the goal.69:19
The offside flag is raised against Matt Green. Indirect free kick taken by Paul Farman.66:23
Free kick awarded for a foul by Jamie Taylor on Exodus Geohaghon. Direct free kick taken by Alan Marriott.65:57
The assistant referee flags for offside against Matt Rhead. Paul Farman takes the indirect free kick.65:30
Exodus Geohaghon fouled by Jamie Taylor, the ref awards a free kick. Free kick taken by Alan Marriott.64:56
Free kick awarded for an unfair challenge on Gary Mills by Matt Rhead. Free kick taken by Paul Farman.63:38
The ball is crossed by Jamie Taylor. Alan Power sends in a cross, Jamie Taylor takes a shot. Save by Alan Marriott.60:52
The ball is crossed by Daniel Gray, clearance made by John Dempster.60:11 Substitution
Substitution Ben Hutchinson goes off and Matt Rhead comes on.59:13
Jamie Taylor takes a shot. Blocked by Chris Clements. Corner taken right-footed by Alan Power from the left by-line, save made by Alan Marriott.58:31
The ball is sent over by Jake Sheridan.57:38
Adam Smith crosses the ball. The ball is swung over by Alan Power.56:43
Inswinging corner taken by Alan Power.55:45
The ball is swung over by Jamie Taylor, save by Alan Marriott.55:06
Unfair challenge on Adam Smith by Ritchie Sutton results in a free kick. Direct free kick taken by Gary Mills.54:05
Daniel Gray sends in a cross.53:32
Free kick awarded for a foul by Lindon Meikle on Alan Power. Daniel Gray takes the direct free kick.53:23
Centre by Chris Clements, clearance by Tom Miller.52:07
Daniel Gray produces a cross, clearance by Lee Beevers.50:47
Adam Smith takes a shot. Exodus Geohaghon gets a block in. Jake Sheridan crosses the ball, Exodus Geohaghon makes a clearance.49:16
Ritchie Sutton fouled by Jamie Taylor, the ref awards a free kick. The free kick is delivered right-footed by Chris Clements from right channel, clearance by Lindon Meikle. Louis Briscoe takes a shot. Blocked by Peter Gilbert. Adam Smith takes a shot. Chris Clements gets a block in. Alan Power delivers the ball.46:29
Corner taken right-footed by Chris Clements from the left by-line, John Dempster takes a shot. Paul Farman makes a save. Ben Hutchinson sends in a cross, John Dempster has a headed effort at goal from deep inside the area missing to the right of the target.45:43
Outswinging corner taken from the right by-line by Chris Clements.45:01
The referee gets the second half underway.45:01 Substitution
Substitution Ritchie Sutton replaces John Thompson.45:00 +3:58 Half time
Half Time The half-time whistle blows.45:00 +3:03
The ball is delivered by Adam Smith, save made by Alan Marriott.45:00 +0:56
A cross is delivered by Jake Sheridan.44:49
Alan Power takes a outswinging corner from the right by-line played to the near post, Anthony Howell makes a clearance.42:24
Adam Smith takes a shot. Save made by Alan Marriott.40:10
Daniel Gray provided the assist for the goal.40:10 Goal scored
Goal! - Adam Smith - Mansfield 1 - 1 Lincoln Adam Smith scores a goal from inside the area low into the middle of the goal. Mansfield 1-1 Lincoln City.39:01
Corner taken right-footed by Alan Power, free kick awarded for an unfair challenge on Alan Marriott by Andrew Boyce. Alan Marriott restarts play with the free kick.37:17
Outswinging corner taken from the right by-line by Chris Clements, John Dempster takes a shot. Tom Miller gets a block in.35:34
Free kick awarded for an unfair challenge on Gary Mills by Anthony Howell. Free kick taken by Gary Mills.34:37
The ball is delivered by Jake Sheridan, save by Alan Marriott.33:08
Tom Miller challenges Matt Green unfairly and gives away a free kick. The free kick is swung in right-footed by Chris Clements, clearance made by Tom Miller. John Dempster produces a cross, Louis Briscoe takes a shot. Alan Power gets a block in. Outswinging corner taken right-footed by Chris Clements from the right by-line, Chris Clements takes a shot. Save by Paul Farman.31:16
The referee penalises Peter Gilbert for handball. The free kick is delivered right-footed by Chris Clements from right channel.29:32
Louis Briscoe delivers the ball, Ben Hutchinson takes a shot. Save made by Paul Farman. Matt Green takes a shot. Save made by Paul Farman.27:06
A cross is delivered by Daniel Gray, save made by Alan Marriott.26:39
Daniel Gray delivers the ball, clearance made by Exodus Geohaghon.24:18
Outswinging corner taken right-footed by Alan Power from the right by-line to the near post.23:18
Direct free kick taken by Paul Farman.23:18 Booking
Booking Anthony Howell shown a yellow card.23:05
Anthony Howell challenges Gary Mills unfairly and gives away a free kick.21:17
Daniel Gray concedes a free kick for a foul on Lindon Meikle. Ben Hutchinson shoots direct from the free kick.15:52
John Dempster gives away a free kick for an unfair challenge on Alan Power. Alan Power delivers the ball from the free kick right-footed from right channel, clearance made by Exodus Geohaghon.13:57
John Dempster provided the assist for the goal.13:57 Goal scored
Goal! - Paul Farman - Mansfield 1 - 0 Lincoln Paul Farman concedes an unfortunate own goal. Mansfield 1-0 Lincoln City.13:17
Andrew Boyce challenges Matt Green unfairly and gives away a free kick. Direct free kick taken by Chris Clements.12:34
Effort from outside the penalty area by Louis Briscoe goes wide left of the goal.11:25
Jamie Taylor gives away a free kick for an unfair challenge on Chris Clements. Direct free kick taken by Chris Clements.10:37
Free kick awarded for a foul by Alan Power on John Thompson. Chris Clements takes the direct free kick.10:18
Adam Smith produces a cross, save made by Alan Marriott.7:10
Daniel Gray fouled by Ben Hutchinson, the ref awards a free kick. Alan Power delivers the ball from the free kick right-footed from left wing, clearance by Chris Clements.6:22
Alan Power takes a shot. Blocked by John Thompson.5:35
Ben Hutchinson has a header from close range and clears the crossbar.4:06
Centre by Daniel Gray.1:47
Inswinging corner taken right-footed by Chris Clements, Tom Miller makes a clearance.1:12
Lee Beevers crosses the ball, clearance made by Andrew Boyce.0:07
Matt Green is ruled offside. Paul Farman restarts play with the free kick.0:00
The referee gets the match started.
Live data and text provided by our data suppliers