Vadaine Oliver came off the bench to score twice in extra-time and send non-league Lincoln into the FA Cup second round at the expense of Walsall.
The Imps took the lead when Alan Power slotted home, but Richard Taundry's strike equalised for the hosts and took it to an additional period.
Oliver headed Lincoln back in front and he capitalised on James Chambers' wayward back-pass to make it 3-1.
Jamie Paterson's free-kick gave the Saddlers hope but it was not enough.
Lincoln will now face Mansfield at Sincil Bank, after the Stags needed penalties to defeat Southern League Division One Central side Slough in their first-round replay on Tuesday night.
VIEWS FROM THE DRESSING ROOM
Walsall manager Dean Smith told BBC WM:
"I think we gave some sloppy goals away and we never created enough clear-cut chances.
"First half, we looked nervy with the small crowd here - I thought we started the second half really well, then they score an offside goal.
"From then on I was pleased with how we responded, Richard Taundry got a really good goal and we dominated possession.
"When it went to extra-time I thought we would go on and see the game out, but we conceded a poor goal from a set-piece and it was an uphill battle from there."
Lincoln City manager David Holdsworth tells BBC Radio Lincolnshire:
"It was an accumulation of everything tonight - guts, character.
"Everybody played their part tonight. I'm very proud to manage the club.
"We wanted to be together and that was the most important thing tonight and we did that.
"These nights are what football is about."