Thomas Muller reached a century of Bundesliga goals as Bayern Munich fought back to beat Werder Bremen 4-2.
Muller and Robert Lewandowski both scored braces as lowly Werder gave Bayern a real fright at the Allianz Arena.
Jerome Gondorf had fired the visitors into a 26th-minute lead and Werder were level in the final quarter when Niklas Sule put through his own net.
But the visitors were denied what would have been a precious point when Lewandowski and Muller struck in the closing stages.
Werder had travelled to Bavaria with little cause for optimism after conceding 32 goals on their last six league visits to Bayern.
But they almost claimed a seventh-minute lead when Ludwig Augustinsson crossed from the left and Max Kruse's header was deflected onto the post by Juan Bernat's faint touch.
Franck Ribery saw his low drive held by Jiri Pavlenka in the Werder goal, but Bayern were struggling to go through the attacking gears.
And they were punished after Zlatko Junuzovic fired narrowly wide from 25 yards after goalkeeper Sven Ulreich's punch from a corner lacked distance.
Maximilian Eggestein and Kruse combined for the stretching Gondorf to squeeze the ball through the legs of Ulreich for his first goal of the season.
Werder continued to impress and Ulreich held Thomas Delaney's effort following more slick approach play from the visitors.
Despite the presence of Ribery and Arjen Robben in wide areas, Bayern had laboured for most of the half before equalising four minutes from half-time.
Milos Veljkovic failed to cut out Jerome Boateng's deep cross and Muller controlled the ball expertly on his chest before volleying home past the helpless Pavlenka.
The equaliser failed to diminish Werder's attacking adventure and Gondorf's chip was deflected over the crossbar by Sule.
But Bayern gradually began to raise the tempo in the second period and Pavlenka batted away substitute Arturo Vidal's fierce shot from inside the box.
Bayern were ahead after 63 minutes later when Lewandowski punished some Werder marking, the Poland striker climbing above Delaney from James Rodriguez's corner.
Werder were in danger of caving in at that point as Lewandowski was denied a second by Pavlenka and Ribery's follow-up was blocked on the goal-line.
That appeared a decisive moment when the hesitant Ulreich conceded a needless 74th-minute corner needlessly.
With Bayern defenders standing like statues, Kruse's kick cleared everyone before striking Sule and crossing the line.
But Bayern were back in front two minutes later as Muller crossed and Lewandowski headed home his 17th goal of the season past Pavlenka, who should maybe have done better.
Werder almost equalised when Ulreich made a fine save from Junuzovic as the visitors refused to give up.
But the result was put beyond doubt Muller raced onto Rodriguez's pass six minutes from time, securing Bayern's sixth straight Bundesliga win and reaching his own personal landmark into the bargain.