Crewe Alex let the lead slip three times as they were held to a 3-3 draw by Macclesfield.
Jordan Bowery put the Alex ahead after just three minutes.
Scott Wilson equalised for the home side on 15 minutes.
Chris Porter restored the visitors lead on 32 minutes with a penalty he won after being brought down by goalkeeper Kieran O'Hara.
Nathan Cameron drew the home side level for a second time on 74 minutes.
George Ray then looked to have won it for the Alex with a goal 5 minutes into stoppage time.
But there was still a late dramatic twist when Reece Cole fire home for the Silkmen in the 97th minute.
The result leaves Crewe in 15th place, nine points off the play-off places.
The Railwaymen are back in action on Tuesday night when they entertain high flying Carlisle who have won eight of their last ten games.