Stoke progressed to the quarter-finals of the Capital One Cup as they saw off brave ten-man Birmingham on penalties following an incredible 4-4 thriller at St Andrews.
It is only the third time the Potters have made the last eight since winning it as the League Cup back in 1972 -- the sole major honour in their 150-year history.
Stoke had looked set for 3-1 victory in normal time until Blues substitute Peter Lovenkrands scored twice in a stunning finale to send the majority of the 13,436 present into raptures.
It was a plucky response from the hosts, who had seen Wade Elliott controversially dismissed in a mass melee on the stroke of half-time for an apparent elbow on Oussama Assaidi, who was accused of making the most of the contact.
It was the Moroccan winger, on loan from Liverpool, who put the visitors on their way as he drilled into the top corner from 30 yards before Tom Adeyemi levelled for Blues heading towards the interval.
The Potters needed no invitation to make their numerical advantage count in the second half as Peter Crouch headed a second and Marko Arnautovic added a well-taken third.
But, out of nowhere, 2011 winners Birmingham forced extra-time, only to be undone by Stoke substitute Kenwyne Jones just four minutes in.
Yet, once again, amazingly, the home side managed to level once more late on courtesy of Olly Lee to send the game to penalties.
Steven N'Zonzi duly netted the winning spot-kick in a 4-2 triumph as the Staffordshire outfit, struggling and winless in the Barclays Premier League since late August, finally prevailed.
And it would have been a mightily relieved Stoke manager Mark Hughes who celebrated the full-time whistle three days ahead of his 50th birthday.
Hughes made five changes from Saturday's narrow 3-2 defeat at Manchester United, and it was two of those who combined for the visitors' stunning opener.
Arnautovic, so impressive at Old Trafford, fed Marc Muniesa down the left and he backheeled into the path of Assaidi, who let fly with a long-range screamer into the top corner despite the best efforts of Colin Doyle.
Birmingham had struggled to get a foothold in proceedings but equalised in fine style just before the half-hour courtesy of another well-worked goal.
Nikola Zigic headed on Mitch Hancox's long ball, and Lee Novak surged forward and flicked into the path of the onrushing Adeyemi, who had time and space to convert coolly past Thomas Sorensen.
The tie had become a finely-balanced affair leading up to half-time, but that changed when Elliott saw red for an adjudged raised elbow on Assaidi amid a large scuffle by the corner flag.
And, having threatened a couple of times, it was not long before Stoke made their numerical advantage count in the second period as Crouch flicked home Muniesa's cross from the right.
Arnautovic added a sweet third in the 70th minute, having received N'Zonzi's pass, before Crouch smashed an overhead kick against the woodwork.
Lovenkrands netted from close range in the 85th minute to provide Birmingham with a lifeline, which they duly grabbed courtesy once more as the Dane poked home when Sorensen could only parry Demarai Gray's effort in five minutes of injury time.
Jones thought he had had the final say as he received Stephen Ireland's throughball to round Doyle and convert, only for Lee to force penalties with a finish from distance.
But it was Stoke who triumphed to book their place in Wednesday's quarter-final draw.