Curzon Ashton 3-4 AFC Wimbledon
AFC Wimbledon scored four times in a remarkable last 10 minutes as they came from 3-0 down to beat non-league Curzon Ashton and escape an FA Cup shock.
Adam Morgan gave the National League North hosts the lead from 30 yards and then added his second from close range.
Morgan volleyed home for his hat-trick, before the League One Dons scored three in three minutes through Tom Elliott, Dominic Poleon and Tyrone Barnett.
Elliott headed in his second in added time to send the Dons into round three.
AFC Wimbledon had only reached the third round once before - losing 2-1 to Liverpool in 2014-15 - and they appeared to be set for a surprise exit from this year's competition when former Reds trainee Morgan scored a spectacular opener inside the first 60 seconds.
Curzon Ashton, who are only four points above the relegation zone in National League North and were bidding to reach the third round for the first time, looked to be cruising through when 22-year-old Morgan added two further goals either side of half-time to extend their lead.
But the Dons were handed a lifeline when goalkeeper Hakan Burton failed to make contact as he tried to punch a corner clear, allowing Elliott to convert from close range, with Poleon's second goal a carbon copy of the first.
Tyrone Barnett's header then brought the visitors level, before Elliott took advantage of more poor defending from a free-kick to complete a dramatic turnaround and spark jubilant scenes in the away end.
Curzon Ashton boss 'proud' in defeat
Despite seeing their hopes of a potentially lucrative third-round tie against Premier League opposition end in the space of 15 minutes, Curzon Ashton manager John Flanagan said his side will "soon recover" from the defeat.
"Adam Morgan's scored a hat-trick and he's not on the winning side, but at the end of the day, I don't feel any worse for him than I do for any of the others because they've all put absolutely everything in," he told BBC Radio Manchester.
"I'm really proud of everybody, they've done a great job. We've entertained, we've contributed to a really good game of football and made it exciting.
"I'm sure everybody in the area was shouting for us and they were probably as gutted as us when that final goal went in."
My boys don't give up - Dons boss
Wimbledon manager Neal Ardley also paid tribute to the Dons' opposition, admitting that he did not think his side would recover after falling three goals behind.
"I thought their third goal could be the killer blow but I've got a set of boys in there who don't give up, who fight for everyone, and once we got back to 3-1 I knew we would have enough chances," he said.
"Part of me feels very, very sorry for Curzon because I thought they were absolutely incredible - they counter-attacked brilliantly and scored some good goals."
The Final Score view: 'For 15 minutes they switched off and got punished'
Ex-Coventry and Aston Villa striker Dion Dublin: "When you're in a situation, when you're that far ahead - both in goals and quality - you've got to shut up shop. They were basically in the hat. But their defending was terrible, there was no leadership.
"The players have just got to dig in and pull their sleeves up and do whatever it takes. But for 15 minutes they switched off and got punished.
"To come back like that, to show the resilience and the belief in each other, regardless of who the opposition is, that's something Wimbledon will remember for the rest of their lives too. The manager didn't panic, the players didn't panic and they felt they were still in the game."
Former Wigan and Reading forward Jason Roberts: "I feel so sorry for them. People like Adam Morgan, who was at Liverpool, had an opportunity to show his quality and he did that and scored a hat-trick - but nobody is going to remember that now because they lost the football match.
"In sport you have moments that'll live with you forever - and the Curzon Ashton manager John Flanagan knows he'll be talking about that for the rest of his life."