BERLIN — Robert Lewandowski scored four goals as Bayern Munich defeated Hertha Berlin 4-3 in a dramatic finale to their Bundesliga game on Sunday.

The Poland striker converted a penalty in injury time to leave the visitors with nothing but pride after twice coming from behind, from 2-0 and 3-2 down, to make it 3-3 in the 88th minute.

Bayern coach Hansi Flick said a hectic schedule was having adverse effects on his team, one week after its 32-game run without defeat across all competitions ended in a 4-1 loss at Hoffenheim.

Bayern's off-season was shorter than usual due to participation in the delayed Champions League final, while last weekend's defeat came days after winning the UEFA Super Cup against Sevilla.

“The whole situation, the conditions, how we started the season was not ideal,” Flick said. “We're rushing from one game to another.”

Flick said his side's concentration dropped after conceding Hertha's first goal.

“We have to try playing good football again after the international break,” Flick said.

American defender Chris Richards made his first start for Bayern and set up Thomas Müller for what appeared to be the opening goal in the 36th minute. But the goal was ruled out through VAR as Müller was marginally offside.

There were no such issues four minutes later when Lewandowski grabbed his first goal. Again, Richards was involved. He crossed for Lewandowski to force a good save from Hertha goalkeeper Alexander Schwolow. Serge Gnabry was first to the rebound and he pulled it back in through several defenders for Lewandowski to score from five meters (yards).

It was the Poland striker’s 100th goal in Bayern’s stadium.

Richards set up Lewandowski's 101st, sending in a low cross from the right in the 51st minute. Lewandowski took two steps before unleashing his shot inside the left post.

Hertha didn’t crumble, and Jhon Cordoba pulled one back with a powerful header to Matheus Cunha’s free kick in the 59th.

Richards picked up an injury and had to go off in the 65th, when Flick made a triple substitution.

But the visitors kept pushing and Cunha equalized in the 71st. The Brazilian made the most of a lucky bounce to go past Leon Goretzka and Jerome Boateng, played a one-two with Krzysztof Piatek, then stayed calm to sweep the ball past Manuel Neuer in Bayern’s goal.

Schwolow made a fine save to deny Lewandowski from a free kick, and the unmarked Corentin Tolisso somehow missed when it seemed easier to score.

Müller set up Lewandowski to complete his hat trick from close range in the 85th, but Jessic Ngankam equalized with a header in the 88th, just a minute after coming on for Hertha.

“We can’t be happy with how we defend our goal,” Müller said.

Maximilian Mittelstädt hauled Lewandowski down in the penalty area in injury time, and the forward dusted himself off to score the winner from the spot.

Wolfsburg and Augsburg drew 0-0 in the early game.

___

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports

___

Ciarán Fahey on Twitter: https://twitter.com/cfaheyAP