Champions Bayern Munich were made to work hard before edging amateurs SV Rodinghausen 2-1 on Tuesday to advance to the DFB Pokal third round.
Missing half a dozen players through illness or injury, Bayern were far from their best against their fourth-division opponents on a rainy and cold evening in east Westphalia and had to endure a nervous finale before booking their spot in the next round.
Quick goals from Sandro Wagner in the eighth minute and Thomas Mueller, who scored with a penalty five minutes later, put the visitors in the driving seat.
Bayern, second in the Bundesliga, were awarded a second spot kick in the 22nd minute but Renato Sanches' effort bounced off the crossbar.
The hosts cut the deficit four minutes after the restart with Linus Meyer beating Rafinha to connect with a cross as the home crowd erupted in wild celebrations.
Franck Ribery had a rare chance in the second half but his low drive was palmed wide by keeper Niclas Heimann as Bayern took their foot completely off the gas and looked short of ideas and Rodinghausen pressed for an equaliser.
The Bavarians, who have now won four matches in all competitions after a four-game winless run, may have to make do without Thiago Alcantara in the coming matches after the Spaniard suffered a leg injury.