Niko Kovac secured a first Bundesliga victory in charge of Bayern Munich as the champions commenced their title defence with a nervy 3-1 win over Hoffenheim on Friday.
Robert Lewandowski converted an 82nd minute penalty at the second attempt before Arjen Robben struck in stoppage time to seal all three points.
It appeared as though new boss Kovac, who replaced Jupp Heynckes at the end of last term, would be forced to settle for a point when Adam Szalai produced a classy 57th-minute finish to cancel out Thomas Muller's earlier header.
But the reigning champions, who lost Kingsley Coman to a concerning ankle injury, were given a lifeline when substitute Havard Nordtveit brought down Franck Ribery with under 10 minutes remaining.
Lewandowski, who has recently been vocal in the press about feeling unsupported by Bayern, had his first attempt at the winner saved by Oliver Baumann, and Robben's successful follow-up was ruled out for encroachment.
The prolific Poland striker was subsequently sent back to the spot and made no mistake at the second attempt as Robben eventually joined him on the scoresheet with a clinical finish at the death.