Wrexham striker Chris Llewellyn turned from villain to hero in the space of a few seconds at Colchester United.
In a dramatic finale with the game standing at 1-1, visiting striker Llewellyn missed an open goal in the third minute of stoppage time.
The Welsham was clean through on goal, and although he managed to round keeper Dean Gerken, he sliced his shot wide with an empty goal beckoning.
However, his horror story had a fairytale ending as Llewellyn burst through on goal again in the fourth minute of injury time, but this time he beat Gerken to notch his first league goal of the season and the winner for Wrexham.
Hosts Colchester had taken the lead in the 49th minute. Neil Danns, who is on loan from Blackburn Rovers, was on target for his third goal of the month.
Skipper Wayne Brown had his shot blocked following a corner by Joe Keith but midfielder Danns reacted quickly to fire home the loose ball from 10 yards out.
Yet Colchester sat back after this goal, and Wrexham made them pay in devastating fashion.
Denis Smith's side were level 10 minutes later thanks to a thunderbolt from centre-half Steve Roberts.
Colchester could only half clear a free-kick by Darren Ferguson and Roberts smashed home a shot from just inside the box for his second goal of the campaign.
The Welshmen dominated after this and the Essex hosts had their young keeper Gerken to thank for a number of smart saves.
Teenager Gerken, who was making his home debut, excelled to make vital saves to deny both Llewellyn and Hector Sam.
This kept the scores level, and Colchester almost stole it in the last minute of normal time when Craig Fagan lobbed keeper Matt Baker only to see his effort canon back off the bar.
Colchester were cursing their luck, and it got worse for them thanks to the Llewellyn one-man show in injury time.