Niko Kovac urged Bayern Munich to eliminate "cheap mistakes" after his team overcame Mats Hummels' error to beat Hertha Berlin 3-2 in extra time of their DFB-Pokal last-16 tie.

Bayern had fallen behind in the capital to Maximilian Mittelstadt's third-minute opener, which came after Kovac's side failed to deal with a routine long ball on Wednesday.

After Serge Gnabry's brace had put Bayern ahead, substitute Davie Selke capitalised on Hummels' gaffe to make it 2-2 and force extra time, with Kingsley Coman's header eight minutes into the additional period proving to be the winner.

Yet Bayern head coach Kovac was unhappy that his team needed extra time to reach the last eight midweek.

"We have to turn off our mistakes," Kovac told ARD.

"We make too many cheap mistakes. If we do not always concede two or three goals, we also win our games easier."

Bayern were pegged back late by Hertha, who ensured the tie would at least be decided in extra time after Hummels' mistake with 23 minutes remaining.

The 30-year-old Germany international could have been forgiven for not realising Selke was lurking behind him as he tried to nod back to Sven Ulreich – once again filling in for the injured Manuel Neuer – but the weak attempt left the goalkeeper with no chance of collecting the ball.

"In football mistakes happen - we help each other and are a committed bunch," said Hummels' central-defensive partner Niklas Sule.

And while they did it the hard way, two-goal midfielder Gnabry thought Bayern's victory was a reward for their persistence.

"The joy of progressing outweighs [anything else]," he added. "Hertha has been fighting until the last minute. We are proud to be further. It was a victory of the will."