Joshua Kimmich struck in the 88th minute as Bayern Munich made it eight successive wins in all competitions this season by downing struggling Hamburg 1-0 at the Volksparkstadion.
David Alaba, Javi Martinez, Kimmich and Robert Lewandowski had earlier all been foiled by a series of magnificent saves from home goalkeeper Rene Adler.
But Bayern's incessant late pressure finally told when Franck Ribery got away down the left and picked out Kimmich, who swept the ball home from close range.
The result moves Carlo Ancelotti's men three points clear of Borussia Dortmund at the top of the table, but they did suffer a blow when key defender Mats Hummels limped off early in the second half with what appeared to be a knee injury.
Defeat was tough on Hamburg, who would have been delighted with a point having come into the game languishing in 16th place after making their worst start to a Bundesliga season for five years.
But Bruno Labbadia's men will have taken plenty of positives from a spirited and defensively disciplined display, with Adler set to receive most of the plaudits for a magnificent display of shot-stopping.
Nabil Bahoui missed a glorious opportunity to give the home side the lead, shooting tamely at Manuel Neuer having been played in by Bobby Wood.
At the other end, a sweeping Bayern move ended with Adler producing a superb reflex save to parry Alaba's header, although the Austrian international was subsequently adjudged to have pushed his marker in order to meet Philipp Lahm's cross.
Alaba was the creator of his side's next chance on 18 minutes, delivering a fine ball from the left which was headed narrowly over by Lewandowski.
The visitors began to dominate possession as the half wore, but Hamburg looked lively on the break, with United States international Wood at the heart of their better moments.
And they came close to taking a shock lead from one such counter-attack just before the break as Bahoui picked out Wood and his header back across goal was scrambled clear by Javi Martinez before the onrushing Nicolai Muller could not slide the ball home.
As the second half progressed, however, Bayern upped the tempo and came close to breaking the deadlock three times in as many minutes either side of the hour-mark.
The impressive Adler produced another fine save to foil Lewandowski from close-range before Johan Djourou's perfectly timed block kept out Martinez's goalbound effort.
Hamburg enjoyed another let-off after Emir Spahic appeared to clip Lewandowski as the Pole prepared to shoot, but the referee waved away Bayern's impassioned penalty appeals.
On 70 minutes, Adler was called into action again, this time to parry a well-struck Alaba free-kick and moments later, the former Bayer Leverkusen man produced an even more impressive block to keep out a fierce drive from Kimmich.
Thomas Muller's effort was also kept out by Hamburg's man of the match as the hosts looked set to hang on for a battling point, but it was not to be as Kimmich pounced to ensure that all three points would be heading to Bavaria.