(CNN) -- When you're on a roll, you generally get all the breaks.
And when you're a top football club like Bayern Munich, you make the most of them.
The European champion came from behind to win 2-1 at Hoffenheim Saturday, equaling the German Bundesliga's record run of 36 matches unbeaten.
Pep Guardiola's team can claim sole ownership of that milestone next weekend at home to lowly Augsburg, moving past the mark set by Hamburg 30 years ago.
However, the Bavarians will face a slightly tougher test before then in Tuesday's Champions League trip to Viktoria Plzen, having won the home encounter 5-0 against the Czech side.
"It certainly wasn't our best performance, but we've won it," Guardiola said after his team regained a one-point lead at the top of the table.
"Not everything was perfect, and we'll need to correct the way we're playing. Meetings with Hoffenheim in recent years have always been close, but we did have a little bit of luck today."
The pressure was on Bayern following second-placed Borussia Dortmund's 6-1 hammering of Stuttgart on Friday.
The home side had scored more goals this season than any other in the Bundesliga, and extended that when 18-year-old defender Niklas Sule became the youngest player in Hoffenheim history to find the back of the net.
However, Bayern equalized before halftime when Croatia striker Mario Mandzukic deflected in Franck Ribery's low free-kick for his eighth in the league this season, and the Frenchman was also involved as Thomas Muller scrambled a second-half winner from close range.
"We gave a good account of ourselves against the best team in the world," said Sule, who capitalized when Bayern keeper Manuel Neuer failed to deal with a corner.
"We held them off well and we had chances of our own. But Bayern have the quality you need to go on and score the winning goal."
Third-placed Bayer Leverkusen dropped four points behind Bayern, losing 1-0 at bottom club Eintracht Braunschweig thanks to an 81st-minute goal by Congolese striker Domi Kumbela.
Braunschweig joined Nuremberg on seven points from 11 games after Bayern's local rival lost 3-0 at home to Freiburg -- which moved up to third from bottom.
Borussia Monchengladbach stayed fourth with a 2-0 win at Hamburg, as striker Max Kruse scored in each half to go to seven this season.
Wolfsburg moved up to fifth with a 2-1 win at Eintracht Frankfurt, while sixth-placed Schalke won 2-0 at Hertha Berlin, two points back in seventh place.