FRANKFURT, Germany -- Bayern Munich warmed up for its Champions League semifinal against Real Madrid with a 5-2 win over Werder Bremen in the Bundesliga on Saturday.
Bayern trailed twice but scored three goals in a seven-minute span in the second half to put the match away. Franck Ribery scored and played a role in two other goals as his form finally improved ahead of Tuesday's match against Madrid, which holds a 1-0 lead from the home leg.
Claudio Pizarro scored twice for Bayern against his former club.
"We conceded two counter goals and we can't let it happen on Tuesday," Pizarro said. "Perhaps it's better not to score so many if we give away fewer."
Bayer Leverkusen drew 2-2 at home with Borussia Dortmund and failed to consolidate a place in Champions League qualifying. Leverkusen was only one point ahead of Wolfsburg. Dortmund remained second and was sure to play in the Champions League next season.
Wolfsburg's mood was dampened by a 2-2 draw against Freiburg at home.
Bottom clubs Nuremberg and Eintracht Braunschweig both lost, which means they can avoid relegation only by reaching the playoff spot at the expense of Hamburger SV, which plays on Sunday in Augsburg. There are two rounds left. Hamburg has a match in hand and could escape from the playoff spot.
Nuremberg lost 2-0 in Mainz, Braunschweig went down 2-0 at Hertha Berlin, and Hoffenheim and Eintracht Frankfurt drew 0-0.
Bayern's players wore black armbands and a minute of silence was observed before kickoff in honour of former Barcelona coach Tito Vilanova, who died on Friday. Bayern also expressed condolences, in German and Catalan, on its website. Before becoming head coach, Vilanova was the assistant of Pep Guardiola, who is now the Bayern coach.
"We experienced a lot together. We lost together and won together. This is a very difficult situation," Guardiola said. "The sadness will accompany me forever."
Guardiola said he was disappointed with his players for the first time this season after their performance in the first half.
"The fans don't deserve to see such a first half. In the second, it was better," he said. "But the win is good for our mood."
Guardiola, wearing a dark blue sweater instead of his customary suit, left several regulars on the bench and saw his team get off to a slow start and fall behind after 10 minutes.
Cedrick Makiadi led a counterattack and sent a perfect pass to Theodor Gebre Selassie, who slotted past Manuel Neuer.
Ribery got the equalizer 10 minutes later. Pizarro got a loose ball and sent a through pass to Ribery, who shot through the legs of Bremen goalkeeper Raphael Wolf.
Aaron Hunt made it 2-1 with Bremen's second chance. Franco Di Santo crossed long to the opposite side, Hunt easily faked Jerome Boateng, and slotted inside the far post.
Bayern's comeback began in the 54th with a corner from Ribery. Thomas Mueller headed down to the far post, where Pizarro sidefooted the ball in.
Three minutes later, Ribery gave a no-look pass to David Alaba, whose short feed found Pizarro unchallenged and the striker slid to knock the ball home.
In the 61st, Philipp Lahm crossed from the right and Bastian Schweinsteiger rose to send a powerful header into the roof of the net.
Arjen Robben scored in the 74th in his first possession after coming off the bench. Robben cut inside from the right in his trademark move and drove home with his left foot, finding the low corner as Bremen fell to its seventh straight Bundesliga defeat to Bayern.
Bayern has already clinched the Bundesliga title and is seeking to become the only club to win the Champions League twice in a row.
While its attacking game fell into place after the break, Bayern's defence struggled against the fast break. Bayern has conceded eight goals in its last three Bundesliga matches at home.
Lars Bender put Leverkusen ahead with a seventh-minute header after Stefan Kiessling's header bounced off the crossbar.
Oliver Kirch headed in the equalizer after Marco Reus' cross in the 29th, but Dortmund fell behind again in the 35th with Gonzalo Castro's header. Only four minutes later, Reus converted a penalty for the final score.
Kiessling, Leverkusen's top scorer, limped off the field late with a suspected hamstring injury.