Bayern Munich coach Louis van Gaal admitted his side were lucky to leave Freiburg with three Bundesliga points thanks to Franck Ribery's late winner.
Bayern are still licking their wounds after being dumped from the UEFA Champions League last Tuesday, when holders Inter Milan earned a 3-2 win in Munich to reach the quarter-finals, and yesterday's 2-1 win at Freiburg boosted moral.
With his side also out of the German cup and lagging 14 points behind league leaders Borussia Dortmund, Bayern face the prospect of a season without silverware.
Their aim now is second in the Bundesliga, to earn a place in next season's Champions League, and Van Gaal, who leaves at the end of the season, was glad to get back to winning ways.
"We were lucky not to fall behind in the first half," said the Dutchman, whose side is fourth in the league. "We didn't play well. We were a different team in the second half and at the end of the day, we've won a little luckily thanks to Franck Ribery's goal."
Germany striker Mario Gomez, the league's top scorer, put Bayern ahead with his 19th league goal, his sixth from a header, after just nine minutes.
Bayern goalkeeper Thomas Kraft saved a penalty from Papiss Cisse after 14 minutes, but Cisse was not to be denied his 18th league goal of the season when the Senegal striker equalised on 17 minutes.
Ribery sealed the win when he was sent clear by Ukrainian Anatoliy Tymoshchuk and fired home on 88 minutes.
"We knew it would be difficult after the heavy blow on Tuesday," said captain Philipp Lahm. "We played well in the second half and we ultimately deserved to win. You don't have to play stunning football every time.
"We need wins, we need three points every time, and if so, we'll make it into the Champions League. We've taken three points away from home, and that's what matters."