Bayern Munich suffered their first defeat of the season and their first Bundesliga home loss to Eintracht Frankfurt in 21 years when Filip Kostic drilled home an 83rd-minute goal to earn the visitors a shock 2-1 victory on Sunday.

Kostic picked up the ball on the edge of the box, charged forward and beat goalkeeper Manuel Neuer with a powerful low drive to seal Eintracht's first win of the season and snap Bayern's nine-game winning run in all competitions.

The Bavarians had only themselves to blame for not killing off the game earlier with a string of golden chances but remain top of the table with 16 points, ahead on goal difference of Bayer Leverkusen, who crushed Arminia Bielefeld 4-0 with two goals from Czech striker Patrik Schick.

Borussia Dortmund and Freiburg are a point behind in third and fourth respectively.

"Defeats always hurt," Bayern coach Julian Nagelsmann said. "Today that was the case as well. Firstly because it was our first defeat and secondly because it was completely avoidable.

"We did not do some things right just like we had done in the past weeks. The opponents before did not take advantage of it but today we were punished.

"We had a lot of chances to score our own goals."

Eintracht, whose last league victory in Munich was in 2000 before the Allianz Arena was even built, are on eight points in 13th place.

The home side took the lead when Leon Goretzka benefited from a Martin Hinteregger mistake to score in the 29th minute.

The Austrian defender, part of a five-man Frankfurt defence, quickly made amends by powering a header into the net for the equaliser three minutes later.

Both teams had a chance to take the lead before the break with Eintracht's Almamy Toure forcing a superb save from Neuer in the 43rd minute and Bayern's Serge Gnabry hitting the post from close range a minute later.

Eintracht keeper Kevin Trapp was kept busy in the second half, repeatedly denying Gnabry, Leroy Sane and Robert Lewandowski as the hosts pushed forward in search of the winner.

Bayern were punished for their missed opportunities though when Eintracht scored what proved to be the winner against the run of play through Kostic before Trapp made another key save in stoppage time to palm a Goretzka shot wide.