Bayern Munich reached the German Cup quarter-finals after being made to sweat for a 2-1 victory over holders Borussia Dortmund on Wednesday having dominated for much of the game.
The German champions twice hit the woodwork in a furious start before Jerome Boateng headed them into the lead in the 12th minute.
Thomas Mueller doubled their advantage in the 40th with Dortmund offering little resistance as the Bavarians missed half a dozen more scoring chances in a one-sided first half.
They gradually stepped off the gas after the break and allowed Dortmund to get back into the contest with Andriy Yarmolenko ghosting into the box and heading in unmarked at the far post in the 77th.
Dortmund, who had won both previous matches under new coach Peter Stoeger, desperately pushed for an equaliser but shots from Jeremy Toljan and Andre Schuerrle flew narrowly wide while Alexander Isak and Sokratis Papastathopoulos failed to score from close range.
"We deserved the win even though we were put under pressure for the last 30 minutes," Bayern coach Jupp Heynckes told reporters.
"We invested a lot in the first half and that should have been translated into more goals. We did not do that. That is something we need to work on."
Bayern go into a three-week winter break in top spot in the Bundesliga and through to the knockout stage of the Champions League.
They have won nine out of ten league games since Heynckes took over as well as four out of four Champions League matches and their two German Cup games.
"We have merely reached a milestone," Heynckes, who led Bayern to the treble in 2013, said. "We have not achieved anything this season. There is still a long way to go."
Dortmund had reached the final in the previous four editions of the competition.
Bayer Leverkusen also booked their spot in the next round with a 1-0 victory over Borussia Moenchengladbach while Schalke 04, and Werder Bremen advanced, along with Mainz 05, who eased past VfB Stuttgart 3-1 on Tuesday.