Corentin Tolisso struck early in the second half as Bayern Munich made it three straight wins under Jupp Heynckes with a 1-0 triumph over 10-man Hamburg.
Combined with results elsewhere, Tolisso's strike lifted Bayern level with Bundesliga leaders Borussia Dortmund and underlined their improvement since Heynckes replaced Carlo Ancelotti last month.
But the visitors had to ride their luck in the early stages against a Hamburg side who played the last 50 minutes with 10 men after the sending-off of Gideon Jung.
Hamburg will be left wondering what might have been if striker Andre Hahn had taken advantage of a great chance after just three minutes, but instead shot straight at Bayern keeper Sven Ulreich.
They also packed their back line to withstand their opponents' pressure and the tactic largely worked in the first half with Kingsley Coman the pick of the visiting attackers.
Hamburg came close again in the 33rd minute when Hahn delivered a dangerous cross into the Bayern box that was well intercepted by Arturo Vidal.
But the home side's hopes were hit in the 39th minute when Jung was issued a straight red card for hacking down Coman as he burst through on a counter attack.
Thomas Muller replaced fellow striker James Rodriguez at half time and Bayern had the first chance of the second half when Vidal fired a long-range shot wide.
The deadlock was finally broken after 52 minutes when Hamburg defender Megrim Mavraj failed to deal with a cross the ball fell to Muller who fed Tolisso to sweep home.
Hamburg almost responded immediately when Hahn found space in the Bayern box but saw his shot tipped over by Ulreich.
Muller's short afternoon came to an end in the 54th minute when he was replaced by Thiago after having apparently strained a hamstring.
Thiago came close to grabbing Bayern's second in the 71st minute when he smashed a long-range effort against the post.
Mats Hummels directed an Arjen Robben cross inches wide, then with eight minutes left, Robben himself came close with an attempted lob over Christian Mathenia that the Hamburg keeper managed to save.
Heynckes stressed the importance of Bayern's win in their battle to re-assert themselves after an uncharacteristically poor start to the season.
"You have to win matches like this one, and we did just that," he said, according to Bayern's website.
"You could tell Hamburg were highly motivated. Their commitment was outstanding. Their team gave it everything from the first to the last minute.
"We struggled from the start. We didn't keep up the pace and our positional play wasn't precise enough."
Match-winner Tolisso admitted prior knowledge of Dortmund's slip-up against Eintracht Frankfurt spurred his side on to claim victory.
"We knew the result of Dortmund's match. That was an incentive," Tolisso said. "The game was very complicated. We failed to play football as we usually do."
Hamburg's Jung expressed his apologies for the foul on Coman which earned him a red card.
"Of course, I hit my opponent very hard but I didn't intend to hurt him," he said. "I have to apologise to Kingsley Coman. It's a foul -- but if you ask me, it wasn't necessarily a red card."