Bayern Munich were dragged to penalties by 10-men RB Leipzig in this evening's DFB-Pokal second-round clash, but Jupp Heynckes's side eventually prevailed 5-4 from the spot at the Red Bull Arena.
In normal time, Emil Forsberg put the hosts ahead with a penalty in the 68th minute after Jerome Boateng was adjudged to have fouled Yussuf Poulsen in the box.
Thiago Alcantara managed to find the equaliser for the Bavarians, but Heynckes's side were unable to grab that all-important winner inside 90 minutes, despite having a handful of chances.
The visitors started the game on the front foot, coming close to making an early breakthrough when Arjen Robben split the defenders to play Robert Lewandowski onside.
Last season's second-highest scorer in the Bundesliga took the ball to the byline before delivering a low cross towards the middle of the box, but Bernardo managed to clear the danger.
At the other end, Leipzig had an opportunity to strike from a corner kick, which was won off Arturo Vidal, but Forsberg's delivery was headed away by Corentin Tolisso.
The hosts began to grow into the game as the minutes ticked by, and at one point, Bayern struggled to get out of their own half, particularly as they continued to give the ball away in midfield.
Sven Ulreich made two key saves, one which denied Forsberg from inside the box and the other prevented Jean-Kevin Augustin from delivering the ball into the centre of the net.
A contentious refereeing decision was made when Felix Zwayer awarded a free kick on the edge of the area after Vidal brought down Forsberg.
The foul began outside of the box as the former Juventus man tugged at his opponent's shirt before bringing the forward to the ground with a scissor challenge, which resulted in a yellow card.
Leipzig were visibly furious with the referee's decision, and it did not help that Forsberg wasted the free kick when his ball aiming for the top corner swerved over the crossbar.
Bayern mustered a chance in the closing stages of the first half when Lewandowski moved out wide before delivering the ball into the path of Tolisso, who sent it into the arms of the goalkeeper.
After the break, Kingsley Coman tried to break the deadlock by racing down the left-hand side before attempting to score from a tight angle, but there was too much pace on the ball and it soared high into the stands.
Bayern showed more intensity on the ball, and they were given a massive boost in the 54th minute when Naby Keita was shown red for a second yellow-card offence.
The midfielder, who picked up his fifth booking of the season in the first half, was sent off for pulling back Lewandowski while the striker was in full flow.
With Leipzig down to 10 men, Bayern ramped up their efforts on goal, but they were dealt a sucker-punch when Boateng gave away a penalty after appearing to catch Poulsen.
It was another controversial decision, with questions over whether a foul was committed and if it was in the box or on the line, but Forsberg got the job done by sending the keeper the wrong way.
The lead lasted just five minutes, though, as Alcantara levelled up by smashing a header into the back of the net after latching on to the end of a perfectly-timed ball over the top from Boateng.
Bayern piled on the pressure with their extra-man advantage, and Thiago came close to grabbing a second when he connected cleanly with the ball and struck towards the centre of the goal, but Peter Gulacsi was there to save.
Leipzig managed to force the tie into extra time and almost nudged ahead when the ball was played over the top for Marcel Halstenberg from a free kick, but the defender failed to stretch far enough to reach it.
Bayern kept knocking on the door, but they were denied by Gulacsi, who made a double save, stopping close-range efforts from Alcantara and Joshua Kimmich in quick succession.
The visitors created a flurry of chances, with Lewandowski missing a handful of them, including a volley in the centre of the box and a header from close range.
Timo Werner, who came on as a second-half substitute, thought that he had won it for Leipzig after splitting the defenders and getting around the goalkeeper before slotting home, but he was ruled offside.
The match was eventually decided by penalties, and despite being the hero on a number of occasions for Leipzig, it was Werner's miss in sudden death that handed the victory to Bayern.