FA Cup: AFC Wimbledon 4 York City 2 (after extra time)
A Sebastian Brown own goal after 22 minutes put City ahead, but goals either side of half-time from Wimbledon striker Charlie Strutton looked to have saved the hosts at Cherry Red Records Fans' Stadium in Surrey.
City, who were forced to play the second half with 10 men after Scott Kerr was sent off in the 35th minute, were given an unlikely lifeline when Jamie Reed struck at the death to send the game into extra time.
The first period of extra time was dominated by Wimbledon, with Byron Harrison scoring in the 97th minute to give his side the advantage before Jack Midson struck two minutes later to seemingly put the game out of City's reach.
But a second goal from Reed late in the second period set up a nervous finish for the hosts, who held on to advance in the time-honoured competition.
Wimbledon will now face the winner of Milton Keynes Dons and Cambridge City in the second round proper, with the two teams set to meet on Tuesday.