Leeds set up an FA Cup tie at home against Tottenham after coming from behind to dump out Birmingham in their third-round replay.
Wade Elliott put Blues ahead shortly after the half-hour mark, just as he had done in the initial meeting which finished 1-1 10 days ago.
But once again Leeds levelled after the break, this time courtesy of Ross McCormack's first goal since September - an effort which had not looked like coming with 19-goal striker Luciano Becchio, a reported January transfer target for a handful of clubs, missing due to illness.
El-Hadji Diouf, celebrating his 32nd birthday, then quickly completed the turnaround, keeping his cool to chip home from the penalty spot after Paul Robinson had been penalised for handball.
It means Leeds will now host Spurs in the fourth round of the competition in a televised clash next Sunday, denying cash-strapped Birmingham the chance to pick up a welcome sum in the region of £200,000.
United's first win at St Andrew's since 1996 also provided them with their 100th in FA Cup history and sealed progress from the third round for only the second time in 10 years.
In his programme notes, Blues boss Lee Clark stressed: ``Although the league is our priority, I certainly don't see the FA Cup as a distraction. I want to do well in it and take it seriously.''
The home faithful hardly shared his enthusiasm, however, as only 8,962 - including an impressive 1,547 travelling Leeds fans - turned out on a bitterly cold January night in the Second City.
And those present may have been regretting their decision after an uninspiring opening half an hour.
Birmingham fans were eventually warmed by a neat one-two between Marlon King and Elliott which saw the latter fire wide from 20 yards, while Chris Burke also drilled off target from distance.
The first shot on target arrived in the 35th minute as King forced Jamie Ashdown to get down low.
And the hosts did not have to wait long for a deserved opener.
King fed Nathan Redmond down the right and he sent a cross to the far post which Elliott converted.
Luke Varney wasted a glorious chance to draw Leeds level immediately, heading wide unmarked at the near post from Diouf's cross.
Leeds, who had failed to manage a shot on target in almost three hours of football, finally broke their duck in the 53rd minute, Rodolph Austin's speculative effort spilled by Colin Doyle.
And they went on to draw level in the 70th minute.
Paul Green's ball into the box was pulled back by Diouf at the far post and McCormack was on hand to stroke home from eight yards.
Green's header brought a solid save out of Doyle soon after but the visitors did not have to wait long for a second.
Austin's cross struck the hand of Robinson and, after much deliberation between the officials, Diouf was handed the chance to convert from 12 yards.
Elliott forced a save out of Ashdown as Blues pressed for an immediate leveller, pressure which almost told with the tie in the final stages.
Nikola Zigic saw his header cleared off the line by Aidy White while fellow substitute Peter Lovenkrands was denied by a superb fingertip save from Ashdown.