Robert Lewandowski scored twice, including a late penalty, as Bayern Munich edged title rivals Borussia Dortmund 3-2 in Saturday's thrilling Klassiker to go four points clear at the Bundesliga summit.

Lewandowski lost out to Lionel Messi for the Ballon d'Or this week, but he continued to let his football do the talking, taking his goals tally against his former club to 26 – more than he has managed against any other team.

Both sides created at will in a gripping first half, but Dortmund – who led through Julian Brandt in the fifth minute – paid the price for costly mistakes as Lewandowski and Kingsley Coman ensured Bayern were 2-1 up at half-time.

A sumptuous Erling Haaland strike got Dortmund back on level terms, but after somehow not winning a penalty of their own, they conceded one themselves and Lewandowski converted to seal the win, setting a Bundesliga away goals record in the process.

A purposeful Dortmund start brought an early opener as Brandt – later withdrawn due to a nasty head injury – collected Jude Bellingham's lofted pass and finished emphatically having evaded Alphonso Davies.

But Bayern quickly hit back, Lewandowski clinically finding the bottom-right corner with his record-equalling 117th Bundesliga away goal after Thomas Muller charged down Mats Hummels' clearance attempt.

Several chances were wasted at either end thereafter, but Bayern managed to take a lead into the break.

Another botched Dortmund clearance – this time Guerreiro smashing into Hummels' midriff – saw the ball fall for Coman and he drilled home.

Dortmund restored parity again just after the interval, Haaland curling a gorgeous effort out of Manuel Neuer's reach and in off the right post.

They should have had the chance to lead a few minutes later but Lucas Hernandez mystifyingly avoided conceding a penalty when appearing to commit a blatant foul on Marco Reus.

Hummels was not so lucky, however, with a VAR check deeming him to have handled at a corner. Lewandowski squeezed his winning kick just inside the post for another away goal, an outright Bundesliga record for the Pole, and a valuable win for Bayern.