Leeds earned progression to the fifth round of the FA Cup in a tightly fought contest against Birmingham, where penalties were required to separate the two sides.
Despite spending the majority of the game on the back foot, it was Leeds who gained the ascendancy in the scoreline as Lukas Nmecha fired his side in front swiftly after the restart.
It looked like the visiting side were going to hold on until a long-range effort from Patrick Roberts took a deflection and flew past Lucas Perri into the back of the net.
Thirty minutes of extra time were unable to separate the two sides, as the game was to be decided via a penalty shootout.
A save from Lucas Perri and a miss from Patrick Roberts handed Sean Longstaff the opportunity to win it for Leeds, which is exactly what he did, sending the visitors through to the next round.
Story of the match:
Fresh off their impressive fightback against Chelsea midweek, Leeds started on the front foot; Noah Okafor breaking forward and winning the first corner of the match two minutes into proceedings.
But Birmingham swiftly responded, threatening the Leeds backline and working their way into dangerous positions. The crowd at St. Andrews were already voicing their appreciation towards their sides' purpose going forward.
Jay Stansfield was looking lively in the early stages, coming within inches of giving his side the lead. A deft first-time shot from just outside the box forced Lucas Perri into a magnificent save, denying the Englishman a memorable finish.
It was certainly the home side who were on top in the opening twenty minutes as the Leeds backline had been put under a fair amount of pressure by their opposition.
The final shot just was not coming off for Birmingham. A ball over the top unlocked the visitors' defence once more as Demari Gray brought it down perfectly, but once more it was the finish that let the Blues down as they continued their pursuit of an opening goal.
Daniel Farke's men had been sluggish, their first shot on target not arriving until the half-hour mark. Even then, the resulting corner ended in them going backwards and conceding a foul; a frustrating watch for those in the away end so far.
The pressure from Birmingham continued to grow as Gray called Perri into action once more, Leeds' goalkeeper emerging on top again. The Brazilian had been the much busier of the two keepers in the first half.
Despite the home side looking the much more dangerous of the two sides in the first half, the teams would enter the break level, perhaps serving as the one positive for Farke to take from the first 45 minutes. Leeds' manager would have been under no illusions that something had to change quickly if they wanted to remove the threat of an upset.
Chris Davies' men had put in a strong account of themselves so far against Premier League opposition, but would have been left hoping that missed chances in the first half would not come back to haunt them.
There was a solitary change for each side as Ethan Ampadu was brought on in place of Facundo Buonanotte, whilst Gray made way for Ibrahim Osman.
Leeds were looking to make things right quickly, getting off to a fast start in the second half as they hunted for the goal to put them in the lead. Already more settled than they were in the first half, the visitors very swiftly got their goal to put them in control of proceedings.
Four minutes into the half, Okafor laid the ball off to Lukas Nmecha following a break forward. The German needed no second invitation to unleash an effort, nestling perfectly in the bottom left corner to give his side the ascendancy.
Birmingham quickly got their heads up, undeterred by going behind and continuing to go forward with the same confidence that they possessed in the first half.
The Blues continued to cause some frantic moments in the Leeds box, but the visitors' defence continued to prove a stubborn prospect to break down; Birmingham were still more than in this.
Sensing that nothing had been decided yet, Daniel Farke turned to his bench once more, introducing Brenden Aaronson and Dominic Calvert-Lewin to play, looking to avoid any late scares.
Lack of quality in the final third was continuing to be Birmingham's issue as the clock was firmly against the home side now. The Blues had more than enough opportunities to be on the scoresheet but it looked like it just was not going to be their day.
However, in the final minute of regulation time, step up Patrick Roberts. The 29-year-old struck from outside the box. Helped by a deflection off the head of James Justin, his effort rifled past Perri and into the back of the net, finally rewarding Birmingham with the all-important equaliser.
With six minutes of added time, it was the home side looking the more likely to snatch a winner at the death, and they came incredibly close to doing that with the last kick of the game.
Ibrahim Osman was given space to get his shot off. It looked destined for the back of the net, but it rather struck the post. Kanya Fujimoto rushed in to surely win it, but failed to put the ball in the net, instead being met with a Leeds body; this one was going to extra time.
The first half of extra time saw very few opportunities for either side, the best falling to a man in blue. Stansfield played a beautiful ball across the goal towards Osman, who was darting into the box. The winger got his finish all wrong, however, as the ball travelled comfortably over the bar.
There were fifteen minutes for either side to find a winning goal; penalties were looming in the not-so-distant future.
Leeds were handed a chance to grab what would surely have been the winning goal with less than three minutes to play as Joel Piroe opted to shoot rather than play the ball across; a choice that bore no fruit for Leeds.
Both teams had thrown everything at it in extra time, but this game was going to be decided with spot kicks.
Two perfect penalties apiece kicked off the shootout before Lucas Perri landed the first blow, denying Tommy Doyle. Aaronson made no mistakes in the following penalty, giving Leeds the advantage.
Birmingham's issues deepened when hero Patrick Roberts' penalty was put off target; Leeds were just one penalty away, and it was Sean Longstaff to take. The midfielder buried his effort, sending Leeds through to the fifth round.
It had been a valiant effort from Birmingham, who had given a strong account of themselves, but would have perhaps looked back at some of the missed chances, particularly the chance to win it with the last kick of the game.
For Leeds, they survived a scare. It was not their most complete performance, far from it. But the only thing important to the travelling fans was progression to the fifth round, and that is exactly what they received.