Accrington Stanley are out of the Checkatrade Trophy following a dramatic 3-2 loss at Lincoln City.
Stanley led the tie twice in the first-half through Mallik Wilks and a stunning Sean McConville effort, but saw their lead cancelled out with goals from Ollie Palmer and Matt Green, the latter on the stroke of half-time.
The second period was a much tighter affair but the tie was decided in the 61st minute when Sean Raggett headed home from a corner.
It took just seven minutes, and the first attempt of the match, for Stanley to take the lead. A clever Billy Kee cut-back on the edge of the area found Wilks, who took a touch, before firing a low shot beyond Paul Farman in the Lincoln net, giving his side the perfect start.
The home side levelled it up in the 37th minute, following alert play inside the area by Matt Green, who seized on a loose ball before squaring for his strike partner Ollie Palmer to finish calmly from close range.
That goal started an incredible eight minutes before the break as Stanley regained the lead in the 41st minute in breathtaking fashion. Skipper for the evening McConville spotted Farman off his line from inside his own centre-circle and proceeded to smash a dipping effort over the goalkeeper and in off the crossbar.
The first-half drama wasn't over though, as in the first minute of added time Green bundled the Imps level capitalising on a breakdown of communication between Max Stryjek and his defence, to make it two apiece at the break.
Raggett headed Lincoln into the lead for the first time of the night, just after the hour-mark. The big defender raced to the front post to power home Sam Habergham's corner.
Just moments later and Stanley had defender Mark Hughes to thank for still being alive in the tie, goalkeeper Max Stryjek raced off his line but was beaten by Green's lobbed shot, Hughes chased it down and hooked it away from danger as it was about to trickle over the line.
Stanley, who were frustrated for long periods of the second-half, were denied an 89th minute equaliser first by the bar, following McConville's curled effort, and then by a stunning Farman save from substitute Kayden Jackson.