Lincoln 5-3 Scunthorpe
Simon Yeo came off the bench to score two late goals for Lincoln after Scunthorpe looked to have dragged themselves back into a pulsating match at Sincil Bank.
Mayo opened the scoring for the home side
Yeo, whose equalising goal on the last day of the season against Torquay booked his side's play-off place, struck two sweet goals to give Keith Alexander's men the edge at the halfway stage of the Nationwide Division Three play-off semi-final.
Nathan Stanton's first ever goal for the club in the 70th minute brought Scunthorpe level at 3-3 before Yeo's arrival changed the course of the game once more.
Simon Weaver and Paul Mayo gave the home side a two-goal lead inside 20 minutes before Alex Calvo-Garcia pulled one back for The Iron before half time.
Ten minutes after the interval, Paul Smith's tap-in gave the hosts a two-goal cushion but with just over 20 minutes left Calvo-Garcia struck again to set up the thrilling finale.
Good football was a near impossibility on Lincoln's threadbare playing surface - but the hosts adjusted to the conditions better and were particularly threatening on the left flank.
Mayo's deliveries caused some discomfort in the Scunthorpe penalty area in the opening exchanges and The Iron's susceptibility was exposed when Lincoln opened the scoring.
15 mins: Weaver's header gives Lincoln the lead
18 mins: Mayo doubles the advantage with a sweet volley
26 mins: Calvo-Garcia scrambles home from close range to reduce the deficit
55 mins: Smith restores Lincoln's two-goal advantage
69 mins: Calvo-Garcia is on hand to give The Iron hope
70 mins: Stanton looks to have salvaged a draw for Scunthorpe
82 mins: Substitute Yeo's drive gives Lincoln the lead once more
90 mins: Yeo's half-volley completes a remarkable game
Stuart Benson floated in a dangerous free-kick that lured Scunthorpe keeper Tommy Evans into coming off his line and Weaver headed home from close range.
And five minutes later Lincoln extended their lead through Mayo's superb volley but Scunthorpe battled gamely and halved the deficit after 25 minutes.
Peter Beagrie's dangerous corner caused havoc in the Lincoln box and Calvo-Garcia was on hand to scramble the ball over the goalline from close range.
Lincoln added a third goal after 54 minutes when Mayo did superbly to slot the ball down the line to Dean Cropper, who beat two defenders before cutting the ball back for Smith to finish from close range.
Scunthorpe manager Brian Laws introduced Steve Torpey and Paul Dalglish into the action and the double substitution had the desired effect as Calvo-Garcia struck again after 77 minutes.
Lincoln were on the rack and two minutes later further indecisive defending was punished when Stanton drove into the box before unleashing an unstoppable strike which nestled into the bottom left hand corner of the goal.
But Alexander's decision to introduce Yeo into the fray after 72 minutes was to prove pivotal.
With just seven minutes remaining another long ball into the danger area found the substitute, who let the ball bounce once before striking a delightful left-footed drive past Evans.
And in injury time, a remarkable win was complete when Yeo's half-volley from 12 yards capped a remarkable cameo appearance.
Lincoln City: Marriott, Weaver, Morgan, Futcher, Bailey,
Butcher, Gain, Mayo, Bimson, Smith, Cropper. Subs: Sedgemore,
Yeo, Willis, Bloomer, Cornelly.
Scunthorpe: Evans, Stanton, Jackson, Strong, Dawson, Sparrow,
Kilford, Calvo-Garcia, Beagrie, Hayes, Carruthers. Subs: Capp,
Graves, Torpey, Lee Ridley, Dalglish.
Referee: P Walton (Northamptonshire).