Mainz 05 scored either side of the break through Jonathan Burkhardt and Jean-Philippe Mateta to stun hosts Borussia Dortmund 2-0 on Wednesday.
The victory helped them to take a big step towards remaining in the Bundesliga for another season.
Bayern Munich had on Tuesday secured their eighth consecutive league title and Borussia Dortmund were certain of a top four finish and a UEFA Champions League spot.
So, the hosts rarely threatened in the first half.
Mainz were the livelier team and 19-year-old Burkhardt, who minutes earlier had gone close, grabbed the lead in the 33rd minute with his first league goal on his second start.
Although Borussia Dortmund club bosses had warned that the season was not finished in spite of having secured a UEFA Champions League spot, they looked completely unmotivated.
The visitors doubled the advantage four minutes after the restart with Mateta’s penalty kick after Roman Buerki had saved a shot from Pierre Kunde and defender Lukasz Piszczek brought down Danny Latza.
Borussia Dortmund made feeble attempts to fight back and Achraf Hakimi’s free-kick was tipped over the bar.
But they were lucky not to concede a third goal as Mainz created several good chances.
Mainz are now 15th on 34 points, five above the relegation playoff spot with two games remaining.
Borussia Dortmund remained in second place on 66 points, 10 behind Bayern Munich, after RB Leipzig, in third on 63, conceded two late goals to draw 2-2 with Fortuna Duesseldorf.
RB Leipzig host Borussia Dortmund on Saturday.