Runaway Bundesliga leaders Bayern Munich had their 20-match unbeaten run in all competitions ended at Hoffenheim on Tuesday as Andrej Kramaric's winner sealed the hosts' historic 1-0 victory.
Bayern's run came to an end a week before their mouth-watering Champions League home leg quarter-final against Real Madrid.
This 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 their second defeat in 27 German league games having also stumbled at Borussia Dortmund, but they still hold a 13-point lead in the table.
"Of course, we shouldn't have allowed that to happen," fumed Bayern's captain-for-the-night Arjen Robben.
"It was better in the second half, but the ball wouldn't go in.
"Our lead (in the table) is still big, but that was an unnecessary defeat."
Second-placed RB Leipzig can now trim Bayern's massive lead at Mainz on Wednesday.
This was Hoffenheim's first win over Bayern at the 18th attempt.
Having earned a 1-1 draw in Munich last November, this is 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, Germany's coach of the year for 2016.
"Kramaric had a great game, he scored with the worse chance in the first half for us.
"I said we had to be brave, which we had, but we also played the better football."
With a busy run of fixtures approaching, Bayern coach Carlo Ancelotti rotated his squad, but still started with 10 internationals.
Bayern host Dortmund in the Bundesliga on Saturday, then Real next Wednesday.
With Germany goalkeeper Manuel Neuer recovering from minor foot surgery, reserve shot-stopper Sven Ulreich, the only uncapped player in the starting team, again deputised.
Captain Philipp Lahm, Jerome Boateng and Franck Ribery started 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 on 21 minutes.
A poor clearance from Bayern defender Mats Hummels was snapped up by ex-Leicester City striker Kramaric who slammed his shot past Ulreich.
Bayern's striker Robert Lewandowski hit the crossbar just before the break after Kingsley Coman whipped in a cross.
With time running out, Lewandowski forced Hoffenheim goalkeeper Oliver Baumann into a superb diving save as they hunted the equaliser.
Hoffenheim strengthen their hold on third place and are set to make their Champions League debut next season.
Borussia Dortmund remain fourth after their 3-0 win over resurgent Hamburg, who suffered their first defeat in five games.
Dortmund took the lead when midfielder Gonzalo Castro's long-range free-kick wrong footed Hamburg goalkeeper Rene Alder on 13 minutes.
Japan midfielder Shinji Kawaga scored his first German league goal this season when he slotted home after being set up by Pierre-Emerick Aubameyang nine minutes from time.
Aubameyang then broke free, rounded Hamburg goalkeeper Rene Adler to net Dortmund's third in the 93rd minute.
The Gabon hot-shot has now scored in his last seven games and is the league's top scorer with 25 goals in as many league games.
Schalke suffered their first defeat to Werder Bremen in nine years in losing 3-0 away.
Bremen took a first-half lead when Zlatko Junuzovic's superb long ball was headed in by defender Theodor Gebre Selassie.
Germany striker Max Kruse converted a penalty before 20-year-old midfielder Maximilian Eggestein made it 3-0 with a header to finish off a counter.
Ex-Dortmund midfielder Milos Jojic scored Cologne's winner in their 1-0 victory over Eintracht Frankfurt which moved his side up to fifth.