Jon Otsemobor's improvised goal provided a dramatic late winner as MK Dons denied AFC Wimbledon a dreamed-of result in the second round of the FA Cup.
Jack Midson's diving header had looked set to earn Wimbledon a replay after cancelling out Stephen Gleeson's stunning opener, but Otsemobor flicked home in the last minute to break the visitors' hearts.
The match was the first between the two clubs since 1988 FA Cup winners Wimbledon FC were uprooted from south west London in 2003 and moved over 50 miles north of the capital to the Buckinghamshire town, before being renamed MK Dons the following year.
Angry Wimbledon FC fans subsequently formed AFC Wimbledon from scratch in the Combined Counties League before enjoying a rapid rise up the football pyramid, and are now just one division below npower League One promotion challengers MK Dons.
The bad blood between the clubs was in evidence throughout, with both sets of fans goading the other, but in the main the match passed off without incident, save for a brief pitch invasion following Wimbledon's equaliser.
The hosts controlled the first half but they struggled to create clear chances in the face of a disciplined Wimbledon rearguard action.
Angelo Balanta came close when he curled the ball just wide of the post after a neat turn on the edge of the box before Gleeson broke the deadlock on the stroke of half-time, blasting a 30-yard shot into the top-right corner.
MK Dons burst out of the blocks after the break and skipper Dean Lewington had a 25-yard free-kick pushed over the crossbar by Neil Sullivan before Balanta and Dean Bowditch both lashed strikes into the side-netting.
But Midson made the most of a rare Wimbledon counter-attack to equalise after 59 minutes, glancing a fine diving header past David Martin from Toby Ajaya's cross.
A number of Wimbledon fans spilled onto the pitch following the goal, but stewards quickly restored order.
In a frantic finale, Ryan Lowe had a goal ruled out for offside for Milton Keynes and Wimbledon skipper Steven Gregory was denied by Martin before Otsemobor hung out a leg to backheel substitute Zeli Ismail's mis-hit shot over Sullivan to spark wild scenes of celebration for the hosts.
The Dons will now face Sheffield Wednesday in the third round.
In the day's other second round tie, Alfreton Town were unable to spring a surprise in what was nevertheless a hugely entertaing 4-2 defeat to Leyton Orient.
Dean Cox and David Mooney scored two apiece to give the Football League side the victory, after Paul Clayton had initially given Alfreton the lead with a fine finish after barely four minutes.
Ben Tomlinson scored for the home side just after half-time to return the score to 3-2 and briefly raise hopes of an FA Cup comeback for the ages, but Cox scored his second with five minutes remaining to kill the contest off.
The hosts flew out of the blocks and were ahead on four minutes when top-scorer Clayton fired under Ryan Allsop from 12 yards.
Tomlinson then struck a post and Josh Law's deflected free-kick hit Allsop's bar as the non-league side dominated but Cox levelled for Orient against the run of play on 25 minutes.
And on the half-hour mark the visitors were ahead when Lee Cook's corner was flicked on and Mooney - who scored the goal that broke Gloucester's resistance in the previous round - volleyed home.
Alfreton were shell-shocked and Mooney had his second just six minutes later, heading home Cook's left-wing cross.
On 52 minutes Alfreton pulled a goal back as Tomlinson scrambled home from close range and while the hosts peppered Allsop's goal - Law hitting the bar with another free-kick and Tomlinson from open play - Cox grabbed another late on.
Orient will now face Championship side Hull City in the third round.