Ribery blasted the ball past Oliver Baumann from 25 meters (yards) in the 88th minute, after Mario Gomez's ninth-minute opener was canceled out by Papiss Demba Cisse.

Bayern keeper Thomas Kraft brought Cedrick Makiadi down into the penalty area, but made amends when he saved Cisse's spot kick in the 14th.

Munich remains fourth, two points behind Hannover, which beat Hoffenheim 2-0 at home.

Michael Oenning marked his first game in charge of Hamburger SV with a 6-2 win at home over Cologne, Eintracht Frankfurt beat St. Pauli 2-1, and Werder Bremen won 3-1 at Nuremberg.

Leader Borussia Dortmund played Mainz at home in Saturday's late game.

Bayern started cautiously and Kraft had to react quickly to clear from Cisse in the fifth, when the Senegal striker beat the offside trap.

Gomez converted the visiting side's first chance when poor defending allowed him to head Ribery's free kick past Baumann for his 19th goal of the season.

Cisse kept his season tally one behind, when he equalized in the 18th after poor defending from Luiz Gustavo allowed him to stab the ball past Kraft from eight meters (yards).

Bayern suffered another blow when Arjen Robben went off with an injury in the 30th, to be replaced by Hamit Altintop.

Daniel Caligiuri's speculative effort hit the post for Freiburg five minutes later, and Makiadi was unable to connect properly with the rebound.

Bayern coach Louis van Gaal sent Miroslav Klose on for his 300th Bundesliga appearance with 20 minutes remaining, but it was Altintop who had two good chances to reclaim the lead, before Ribery fired past Baumann from the left.

“It's good to see they want to win so much,” Van Gaal said.

Hannover consolidated third place when Didier Ya Konan marked his return from a knee injury to open the scoring in the 38th. The Ivorian beat Hoffenheim keeper Tom Starke from a narrow angle at the near post for his 12th goal of the season.

Ya Konan was involved in Hannover's second, setting up Lars Stindl to square for Mohammed Abdellaoue in the 53rd.

Former assistant coach Oenning took over after Hamburg sacked Armin Veh last Sunday, and restored Ruud van Nistelrooy to the starting lineup for the first time in five games, as Mladen Petric claimed a hat trick.

A rebound from Aenis Ben-Hatira's shot fell kindly for the Croat to open the scoring in the 12th.

Ben-Hatira's delightful chip over Michael Rensing doubled the score in the 32nd, and Petric scored again six minutes later, following a great through ball from Van Nistelrooy.

Petric completed his hat trick by heading in Eljero Elia's cross when he was left unmarked at the far post in the 43rd.

Mato Jajalo's first Bundesliga goal pulled one back for Cologne in the 50th, two minutes before Gojko Kacar restored the home side's four-goal lead.

Ze Roberto scored Hamburg's sixth from the penalty spot in the 58th, before Lukas Podolski scored Cologne's second.

Fanis Gekas scored his first goals since Dec. 18 to give Eintracht Frankfurt its first win of 2011.

The Greek striker sent St. Pauli goalkeeper Thomas Kessler the wrong way from the spot in the 34th, after he won a penalty from Dennis Daube.

Charles Takyi equalized in the 42nd, when his free kick took a lucky deflection from Georgios Tzavellas past Ralf Faehrmann.

Gekas claimed his 16th of the season in the 77th, to give St. Pauli a fifth straight defeat.

Sandro Wagner scored two penalties won by Claudio Pizarro, and the Peruvian striker also scored as Werder Bremen ended Nuremberg's seven-game unbeaten run.

Ilkay Guendogan briefly equalized for Nuremberg, which had Timothy Chandler sent off for a second yellow card.