Leicester City fought back from two goals down before Mark De Vries scored a sensational stoppage-time winner to dump Premiership high-flyers Tottenham out of the FA Cup.
Spurs appeared to be cruising to a comfortable win thanks to first-half strikes from Jermaine Jenas and Paul Stalteri.
But Elvis Hammond gave City hope a minute before the break, before the East Midlanders levelled on 57 minutes courtesy of a wonderful goal from Stephen Hughes.
Both sides then had chances to settle the tie but it was De Vries who kept his cool at the death to make sure it was Leicester and not Spurs whose name would be in the hat for the next round.
City showed from the off that they were not to be overawed by their illustrious opponents with De Vries eager to give the Spurs centre-backs a rough time and Ryan Smith, on loan from Arsenal, a constant threat down either flank.
But it was the Londoners who took the lead in the 20th minute, against the run of play.
Alan Maybury was ruled to have fouled Aaron Lennon and after Robbie Keane headed Michael Carrick's free-kick against the upright, Jenas was first to the rebound to prod the ball home from five yards.
Keane and then Michael Brown were both denied by Rab Douglas before Spurs finally doubled their advantage on 41 minutes, with Canadian international Stalteri catching out Douglas with a rising drive into the roof of the net from 18 yards.
The Foxes appeared dead and buried but moments before the break they were right back in it when Smith's looping cross to the far post was headed down by teenager Richard Stearman for Hammond to side-foot home from close range.
Spurs had a marvellous opportunity to restore their two-goal cushion when Keane played in Stephen Kelly for a one-on-one with the keeper, but he was embarrassed to see his weak effort sail harmlessly wide.
It was a costly miss, for in the 57th minute City were on level terms when Spurs failed to clear Smith's corner and De Vries set up Hughes, who hammered an 18-yard half-volley beyond the England keeper.
Tottenham substitute Jermain Defoe created a splendid chance for himself, but lifted his shot over the bar.
It looked like a replay at White Hart Lane before Joey Gudjonsson's splendid long-range pass split the Spurs defence, leaving De Vries with the simple task of guiding the ball home from eight yards.