Mario Gomez had given the visitors the lead just before the break, but the hosts regrouped in the second half and grabbed a deserved equaliser through Simon Rolfes, only for Philipp Wollscheid to score an own goal three minutes from time.

After a cagey start, a moment of brilliance in the 37th minute broke the deadlock.

Gomez took a Xherdan Shaqiri pass in his stride, superbly chipped the ball over Daniel Carvajal, and sent a great shot past Bernd Leno to give Bayern the lead.

Heynckes elected to try and preserve the lead after the break, bringing Daniel Van Buyten on for Arjen Robben, but the ploy backfired 15 minutes from the end.

Sebastian Boenisch met a corner at the near post and headed it onto Rolfes, who capitalised on some slack defending at the far post and tapped home.

Leverkusen were unfortunate to concede the winner in the 87th minute, when Bastian Schweinsteiger floated in a free kick which struck Wollscheid and bounced into the net.

Elsewhere, Polish forward Robert Lewandowski bagged a double as Borussia Dortmund thumped Freiburg 5-1.

More than 80,000 fans crammed into the Westfalenstadion for the clash in Dortmund but they were stunned early.

Jonathan Schmid gave Freiburg a surprise lead on 28 minutes, converting Max Kruse's assist.

But in the space of four minutes Freiburg's afternoon turned sour, as Dortmund scored three quick goals.

Lewandowski was the first to net, with the leveller coming on 41 minutes.

Turkish midfielder Nuri Sahin – who set up the first goal – got himself on the scoresheet on 44 minutes and Lewandowski added further polish to the half time score line with his second.

Sahin also got a double, scoring his side's fourth on 72 minutes before substitute Leonardo Bittencourt wrapped up the rout 12 minutes from time.

Lewandowski has now scored 19 Bundesliga goals this season and he has netted in eight successive league matches for the club.

Nuremberg extended their unbeaten streak to seven matches with a 3-0 home win over Schalke.

Markus Feulner opened the scoring on 31 minutes before Alexander Esswein and Mike Frantz netted after the break.

Other results saw Werder Bremen claim a 2-2 home draw against strugglers Greuther Furth thanks to a pair of Aaron Hunt penalties, while Augsburg won 1-0 at Hamburg.

The day's other match saw Hoffenheim play out a goalless stalemate against Mainz.