Luca Toni and Miroslav Klose struck to give Bayern Munich a 2-0 win away to Bayer Leverkusen on Saturday, keeping the champions on the trail of sure-footed leaders Hoffenheim.
While Hoffenheim enjoyed an easy 3-0 win at home to Arminia Bielefeld, Bayern had to work a lot harder to dig out victory over one of their direct rivals with two second-half goals.
A seventh win in nine games was enough to take resurgent Bayern into second place and give them the perfect preparation for a home game against Hoffenheim next Friday.
Hoffenheim, the wealthy village team who are on an even better run with eight wins in nine games, lead with 34 points from 15 matches in their first season in the top flight, followed by Bayern on 31.
Hertha Berlin are third on 30 after their 2-1 win at home to Cologne on Friday, while Leverkusen slip to fourth on 28.
Hoffenheim had their home game against Bielefeld all wrapped up by the 11th minute.
Vedad Ibisevic volleyed in low for the opening goal -- his 17th of the season -- after Selim Teber's cross had picked him out in the fifth minute.
Carlos Eduardo made it 2-0 soon afterwards when he surged forward and sent a skimming shot inside the right-hand post and Francisco Copado converted a late penalty for the third.
Bayern were always going to have a tougher afternoon against Leverkusen, who have looked genuine title contenders under Bruno Labbadia this season.
The home side almost took the lead when Henrique headed against the post from an early corner but Bayern, who secured qualification for the knockout phase of the Champions League in midweek, were soon in control in midfield.
Bastian Schweinsteiger twice went close to scoring from long distance before Ribery helped to set up the opening goal.
The Frenchman's pass found Ze Roberto running into space on the left and his perfectly judged cross gave Toni the chance to outjump the defence and head past Rene Adler.
Leverkusen's response to that classic centre forward's goal was strangely muted and when they did try to launch a quick break they paid the price for a stray pass, as the ball fell for Ribery to set up Klose for the second.
''We showed our class in the second half,'' Bayern coach Juergen Klinsmann told reporters. ''We made a bumpy start to the season but we've put it behind us now.''
Werder Bremen, whose hopes of Champions League progress were dashed when they could only draw with Anorthosis Famagusta this week, restored morale as a Claudio Pizarro hat-trick helped them to get a 5-0 win over Eintracht Frankfurt.