Bayern Munich coach Niko Kovac admitted his side struggled to overcome a resilient Hertha Berlin side before Javi Martinez scored the only goal to give them a hard-fought 1-0 win.
Bayern drew level on points with Bundesliga leaders Borussia Dortmund to give Kovac double reason to celebrate.
The Bayern boss was in charge for his 100th game as a Bundesliga head coach and was rewarded by Martinez's second-half winner.
But it was not all good news for Kovac as substitute Kingsley Coman had to be replaced 10 minutes after coming on for Franck Ribery because of injury.
Following the narrow win, Kovac told his press conference: "Overall, I'm happy. We struggled in the first half. The game was decided on a set-piece.
"We had trouble in the first half. Hertha did very well and bothered us early on."
On midfielder Coman, he added: "We'll need to wait for the examination to assess Kingsley. I hope it's not too bad."
Former Croatia international Kovac, who has also coached Eintracht Frankfurt as well as his national side, saw Martinez head in the only goal with just over an hour gone.
Hertha had their chances to score but finished the game with 10 men as Karim Rekik was sent off with six minutes to go.
Davie Selke had seen an early effort disallowed and Salomon Kalou had his shot cleared off the line as the visitors had the better chances in the first half.
Selke also saw his shot cleared off the line early in the second half before Martinez struck to give his side the lead and Bayern held on for the victory.
Hertha coach Pal Dardai said his side paid the price for not taking their chances in the first half.
He said: "In the first half we played very well tactically and kept them away from our goal. At the break, I told the boys that the first goal would decide this game."
He added on Bayern's winner: "If we defend better beforehand, the ball doesn't get to the corner in the first place."
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport Staff');
ga('pacontentapi.set', 'dimension2', 'c2e658fd-cbfa-4ca9-98d1-5916b11ea6d5');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:match-reports,paservice:sport:uk,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Kovac acknowledges Bayern had to work hard to hurt Hertha'});