Bayern Munich missed the chance to return to the top of the Bundesliga after slumping to their second successive league defeat, going down 3-2 to lowly Mainz at the Coface Arena.
Andreas Ivanschitz put Thomas Tuchel’s side in front in the 11th minute, but Daniel van Buyten’s deflected effort brought Bayern level in the same minute of the second half.
Marco Caligiuri restored Mainz’s lead 10 minutes later before Niko Bungert gave the home side a two-goal cushion.
Van Buyten’s second in the 79th minute set up a grandstand finish but the visitors, who were beaten 1-0 at home by Borussia Dortmund last time out, could not find an equaliser.
Mainz’s victory helped their former coach Jurgen Klopp and his Dortmund side stay in top spot, a point clear of third-placed Bayern.
Tuchel said before the game he had a plan to keep key Bayern trio Mario Gomez, Franck Ribery and Arjen Robben quiet.
With Robben left on the bench by Bayern coach Jupp Heynckes, he only had two major threats to deal with, but it was clear he had done his homework as his were able to dominate the game themselves with Ivanschitz giving them a deserved lead in the 11th minute.
He rounded Manuel Neuer and, although he delayed his shot a while, he still kept his cool to pick his spot past Jerome Boateng, who was covering on the goalline.
Ivanschitz could have made it two in the 16th minute, but he volleyed over the crossbar.
On one of the few times Bayern ventured into the Mainz half in the first half, they won a free-kick out wide right from which Holger Badstuber’s effort was turned onto the top of the crossbar by Christian Wetklo.
Bayern levelled in the 56th minute when Toni Kroos’ free-kick was met by the head of Van Buyten and went in via a deflection off a home defender, but parity lasted just nine minutes before Caligiuri fired Mainz in front again with a low shot from 20 yards.
It was only the second time Neuer had conceded two in a Bundesliga game this season, and it become three soon after as Bungert headed in a corner from six yards out to make it 3-1 to Mainz in the 74th minute.
Another free-kick from Kroos in the 79th minute set up Van Buyten to stick out a leg just a few yards from goal to bring Bayern back into the game.
They could find a leveller, though, as Mainz held on for a crucial three points which lift them out of the bottom three.