Robert Lewandowski scored a dramatic late winner as his double helped Bayern Munich resume the Bundesliga season with a hard-fought 2-1 victory at Freiburg on Friday.
Janik Haberer had put the hosts in front in just the fourth minute at Schwarzwald-Stadion only for Lewandowski to restore parity for the leaders before half-time.
It appeared as though Bayern were going to be frustrated in their search for a winner, as several chances went begging.
But Lewandowski came to the rescue with a fine 91st-minute winner from Franck Ribery's cross to ensure the Bavarians picked up after the mid-season break with a big three points.
Carlo Ancelotti's men have now won six consecutive league matches and open up a six-point buffer over second-place RB Leipzig, who host Frankfurt on Saturday.
Freiburg had won five of seven home league matches heading into the contest and they were rewarded for a positive start in just the fourth minute thanks in part to some unconvincing Bayern defending.
Mats Hummels' poor attempted clearance fell at Vincenzo Grifo's feet who immediately released Haberer down the right and he held off David Alaba before beating goalkeeper Manuel Neuer with a low shot from inside the area.
Bayern came close to an equaliser on the half hour when Arturo Vidal controlled Arjen Robben's cross and unleashed a curling shot towards the far corner that Freiburg goalkeeper Alexander Schwolow only just pushed wide.
Lewandowski was stopped by Mike Frantz's last-ditch tackle after a good cross from Douglas Costa, but the Poland striker was on target from the resulting corner.
Costa swung in the delivery and the prolific striker's acrobatic effort was too powerful for Schwolow.
Bayern went in search of a second goal after the break and Thomas Muller could have made it 2-1 after some good work from Robben, the Germany international seeing his shot hit an opponent before bouncing wide for a corner.
Robben continued to cause the Freiburg defence trouble and he went close after a trademark curled left-footed shot after cutting in from the right, which drew a superb save from Schwolow.
Ancelotti brought on Ribery for Costa in an attempt to force a winner and Robben came close to doing just that after a howler from Schwolow, only for the Dutchman to aim his shot wide.
But Bayern did steal all three points when Lewandowski struck in the closing seconds, controlling Ribery's cross from the left on his chest before poking home in the bottom corner.