Bayern Munich lost in the Bundesliga for the first time this season as Borussia Monchengladbach scored three goals in 14 second-half minutes to claim a 3-1 victory.
Despite being put under pressure for much of the first half, it could have been a different story had Raffael not sent his shot straight at Manuel Neuer early on.
Bayern dominated possession for long spells, but Yann Sommer led the resistance from the home side with impressive saves to keep out efforts from Robert Lewandowski and Thomas Muller.
A breakthrough should have arrived when Mehdi Benatia climbed highest to meet a Xabi Alonso free kick, but the defender could only head into Sommer's hands from a good position.
Kingsley Coman was the next player guilty of wasting a good opportunity as he collected the ball in the box, before striking the post with his low shot.
After defending admirably through the first half, it was Gladbach who opened the scoring after the break when Bayern failed to close down Oscar Wendt, who exchanged passes with Raffael before curling a strike past Neuer.
The lead was soon doubled as a Nico Elvedi flicked on a long pass to find Lars Stindl, who poked the ball beyond Neuer as Gladbach stunned the visitors.
Hopes of a surprise victory were raised even further as a shocked Bayern side were powerless to prevent Gladbach from extending their advantage when Fabian Johnson sprinted clear on the break to slot into the bottom corner.
Franck Ribery was introduced for his first appearance since March and he made an immediate impact by linking up well with Arturo Vidal before firing home, but it proved to be just a consolation as Gladbach secured a memorable win.