BERLIN - Runaway Bundesliga leader Bayern Munich had its 20-match unbeaten streak in all competitions ended at Hoffenheim on Tuesday as Andrej Kramaric's winner sealed the host's historic 1-0 victory.
Bayern's run ended a week before the home leg of its crucial Champions League quarterfinal with Real Madrid.
It was Bayern's first loss since going down 3-2 at Russia's Rostov in a Champions League group game last November.
It was also only its second defeat in 27 league games, having also stumbled at Borussia Dortmund, but it still holds a 13-point lead at the top of the standings.
"Of course, we shouldn't have allowed that to happen," said Bayern captain-for-the-night Arjen Robben.
"It was better in the second half, but the ball wouldn't go in. Our lead is still big, but that was an unnecessary defeat."
Second-place RB Leipzig could trim Bayern's massive lead at Mainz on Wednesday.
This was Hoffenheim's first win in 18 matches against the Bavarian giant.
After a 1-1 draw in Munich in November, Tuesday's result was another feather in the cap for Hoffenheim's 29-year-old coach, Julian Nagelsmann.
"It always sounds good to beat Bayern, we went close in the first match, it was a good bit of work for us," said Nagelsmann, who was named the Germany soccer federation's coach of the year for 2016.
"Kramaric had a great game, he scored off the worst chance for us in the first half.
"I said we had to be brave, which we were, but we also played the better football."
With a busy schedule approaching, Bayern coach Carlo Ancelotti rotated his squad, but still started with 10 internationals.
Bayern hosts Dortmund in the Bundesliga on Saturday, then Real next Wednesday.
With Germany goalkeeper Manuel Neuer recovering from foot surgery, reserve shot-stopper Sven Ulreich, the only uncapped player in Bayern's XI, again deputized.
Captain Philipp Lahm, Jerome Boateng and Franck Ribery started the game on the bench.
Playmaker Thiago Alcantara was rested while Thomas Mueller was sidelined by an ankle injury.
Hoffenheim took advantage of Bayern's changes by dominating the opening half and took a deserved lead in the 21st minute. A poor Mats Hummels clearance was snapped up by ex-Leicester striker Kramaric, who slammed past Ulreich.
Bayern's Robert Lewandowski hit the crossbar just before the break after Kingsley Coman whipped in a cross.
Lewandowski then forced Hoffenheim goalkeeper Oliver Baumann into a superb diving save as the Polish star hunted a late equalizer.
The win strengthened Hoffenheim's grip on third spot as the club's Champions League debut beckons next season.
Agence France-Presse