Kevin Keegan's luck finally turned at White Hart Lane as his Manchester City side pulled off one of the greatest comebacks in FA Cup history to beat Tottenham Hotspur 4-3 in a fourth-round replay.
Eight-times Cup winners Tottenham appeared to have booked a fifth-round trip to Manchester United by halftime, thanks to superb goals by Ledley King, Robbie Keane and Christian Ziege.
But City, reduced to 10 men when midfielder Joey Barton was sent off for dissent seconds after referee Rob Styles had blown his whistle for halftime, roared back.
Sylvain Distan headed in Michael Tarnat's clever free kick three minutes after the break and, when Paul Bosvelt's shot deflected into the net off Spurs defender Anthony Gardener in the 61st, Spurs were suddenly rocking.
City goalkeeper Arni Arason pulled off some great saves on Wednesday as Tottenham tried to kill the tie, but the home side were stunned when Shaun Wright-Phillips lobbed an 80th-minute equaliser.
With the pulsating game heading for extra time, there was one final twist when John Macken, who replaced injured Nicolas Anelka midway through the first half, rose to head home a last-gasp winner.
Keegan, whose reign at City is under threat after a run of 11 Premier League games without a win has left them just above the relegation zone, could only watch a nightmarish first half in stunned silence as his side were torn to shreds.
Central midfielder King curled in a delightful opener after two minutes and Keane, scorer of a penalty in the first match which earned Spurs a 1-1 draw, applied a cool finish from Stephen Carr's pass to make it 2-0 after 19 minutes.
INJURY BREAK
City lost leading scorer Anelka to injury after 27 minutes and when Ziege, playing his second match after a long injury break, made it 3-0 just before the break with a dipping free kick the second period seemed a formality.
But, in a crazy reversal of fortune, City somehow dragged themselves back to book a mouth-watering Manchester derby in the fifth round and avenge their defeat by Spurs in the League Cup this season.
Speaking to Sky Sports, a disbelieving Keegan said: "I don't know how to describe my emotions. It was an incredible comeback, they'll talk about this long after we've all gone.
"I'm very proud of the team. At halftime, I walked off and asked where the nearest job centre was."
Tottenham manager David Pleat slammed his side for a shocking collapse.
"We were sloppy, even in the first half," he said. "The players have let themselves down and the fans must be devastated. We will see now if the players can cope with this defeat, I'll be looking for a reaction."
In the other fourth-round replay, Fulham were leading Everton 2-1 in extra time.