Thiago Alcantara got the winner as Bayern Munich continued to ease the pressure on coach Niko Kovac with a 2-1 Bundesliga win at Mainz on Saturday.
Leon Goretzka's volley put the visitors ahead after a sustained period of attacking pressure but Bayern's defensive frailties were exposed by a fast Mainz break and a Jean-Paul Boetius goal just after half-time.
A draw would have been a disappointing result for Kovac's men, who went into the game trailing league leaders Borussia Dortmund by four points, but Thiago's first league goal of the season helped them to a third successive win in all competitions.
Defeat leaves Mainz winless in six and head coach Sandro Schwarz must stop the rot if they are to avoid a relegation battle.
The hosts set their stall out to defend and packed their penalty area but Joshua Kimmich shook the frame of the goal after 26 minutes when he sent a swerving drive onto the crossbar.
After VAR was used to rule out a Thiago close-range volley that found the net through a crowded box, Bayern opened the scoring on 39 minutes when Kimmich's neat cross from the right was volleyed home smartly by Goretzka from 10 yards out.
Within three minutes of the restart Mainz were level, Daniel Brosinski's cross from the right reaching the far post where Boetius shrugged off Kimmich before beating Manuel Neuer low to the goalkeeper's left with a side-footed finish.
But just after the hour mark, Bayern netted again.
Robert Lewandowski scampered down the right side of the penalty area and whipped in a low cross that found Thiago, who slid in and guided the ball into the left corner of the net to allow the visitors, their coach and their supporters to breathe a sigh of relief.
What does it mean?
The result secured back-to-back league victories for the first time since September for Bayern and Kovac will hope the four-game winless sequence that saw them lose to Hertha BSC and Borussia Monchengladbach is firmly behind them.
Muller back to his best
Thomas Muller's return to the side was a welcome one, the experienced midfielder stroking the ball around confidently and providing Bayern with a near-constant out-ball.
Kimmich caught napping
Despite his valuable contributions to Bayern's attack, Kimmich is a defender and he was slow to react to Mainz's fast break early in the second half, allowing Boetius to get ahead of him and score the equaliser.
Key Opta facts:
- Bayern have scored at least one goal in all 13 Bundesliga away matches at Mainz, 33 goals in total (2.5 per game).
- Bayern have conceded 10 goals in nine Bundesliga matches in 2018/19 – last time Bayern conceded as many goals was in 2008/09 under Jürgen Klinsmann (15).
- Jean-Paul Boetius scored the first goal for Mainz in the Bundesliga after 497 goalless minutes.
- Manuel Neuer has made only one save in his last four matches in all competitions and conceded five goals.
- Leon Goretzka’s last five goals in the Bundesliga were all the first goal in that match.
Bayern must travel north to face Regionalliga side Rodinghausen in the DFB-Pokal, while Mainz face the rather more difficult task of a cup game away at Augsburg.