Freiburg set up a final play-off for Champions League qualification with Schalke after coming from behind to beat relegated Greuther Furth in the Bundesliga today.
The visitors recovered from conceding a third-minute opener to Matthias Zimmermann to win thanks to second-half goals from Jonathan Schmid and Max Kruse.
The win moved Freiburg up to fifth, guaranteeing them Europa League football next season barring an extraordinary turn of events next weekend.
More excitingly, thanks to Schalke losing at home to Stuttgart, Freiburg now sit just a point behind the Royal Blues, whom they host in their last game.
Victory would put them amongst Europe's elite, something which would have been almost unthinkable at the start of the season.
That looked a very remote possibility at the start of the afternoon, though, when Edgar Prib crossed from the left and Zimmermann powered home a header to put the hosts ahead.
Freiburg pushed forward in search of a leveller, Kruse setting up Daniel Caligiuri, but he mis-hit his shot and it did not trouble Wolfgang Hesl in the home goal.
Cedric Makiadi then pounced on an error from Bernd Nehrig and sent Kruse through on goal, but he blasted over the bar.
Freiburg went almighty close to an equaliser four minutes after the break when Matthias Ginter sent a header from a corner toward the far corner, only to see the ball come back off the post and be scrambled out by Hesl.
The officials ruled the ball did not cross the line.
An equalising goal was coming, though, and it arrived in the 69th minute. Jan Rosenthal broke with purpose into the area and drew three defenders to him before squaring the ball for Schmid to convert from close range.
And Freiburg got the winner nine minutes later.
Kruse, who will join Borussia Monchengladbach in the summer, made the most of plenty of space to fire a shot from 22 yards low into the corner and put his side within reach of a Champions League campaign he will not be part of.