Blackpool's hopes of returning to the Hallmark Security League play-off zone suffered another setback in a crazy final 10 minutes, when the teams traded six goals.
The home side played down the slope in a goalless first half, which gave on indication of the drama to come.
The hosts took the lead eight minutes into the second half through Theodore Kidd and seemed to have wrapped up victory when Kidd added a second on 80 minutes.
Dave Worthington made a triple substitution, bringing on Dan Mottram, Carnan Dawson and Zack Hargreaves and going to three at the back.
The impact was immediate as Conah Bishop pulled one back on 83 minutes and top scorer Ben Duffield equalised three minutes later.
The turnaround seemed complete with two minutes of the 90 remaining, when Kit Gregory made it 3-2 to AFC.
AFC’s Billy McKenna was shown a red card for his celebrations, despite having been substituted earlier. The celebrations were suddenly halted as Brad Aspinall equalised and Nathan Randall struck the winner deep in stoppage time.
AFC must regroup or a massive away game on Tuesday at Alsager, who are above them on points difference from two fewer games. Victory would pull AFC level with Cammell Laird 1907 in the final play-off spot.
Blackpool: Kirkland, Nay, Betteridge, Cassidy, Baird, Pickering, Bishop, Fishwick, Duffield, McKenna, Gregory; subs: Speight, Dawson, Mottram,Hargreaves, Donaghy.