Bayern Munich winger Serge Gnabry scored one of the goals for the Bavarian giants who edged Heidenheim in a nine-goal thriller to secure their place in the German Cup semifinals.
The former Arsenal player was amongst the goals as Bayern beat the second tier side 5-4 at home despite playing the majority of the game with 10 men.
The hosts took the lead through Leon Goretxka in the 12th minute before they were reduced to ten men three minutes later.
Bayern were left to navigate the German Cup quarterfinal clash with ten men after Nicklas Sule was sent off with only a quarter of the hour gone.
The visitors capitalised on their numerical advantage to score the equaliser in the 26th minute through Robert Glatzel before Marc Schnatterer added a second goal for the German Bundesliga 2 side with six first-half minutes left to play.
With his team trailing 2-1 at home and with a man down, Bayern Munich manager Niko Kovac made two changes including topscorer Robert Lewandowski and that proved to be the catalyst needed for the Bavarian giants.
Thomas Mueller, Robert Lewandowski and Serge Gnabry scored three goals within 12 minutes to put Bayern 4-2 ahead.
Glatzel added a brace to complete his hattrick and make it 4-4 for his team before substitute Lewandowski scored the winning the goal from the spot with six minutes left to take Bayern to the German Cup semis.