Stuttgart will play international football next season after they reached the DFB-Pokal final by beating 2-1 Freiburg at home in the semi-finals.
Stuttgart's victory sets up a date with record champions Bayern Munich in the German Cup final in Berlin on 1 June. Stuttgart have won three German Cup titles - the last dating back to 1997 - and with Bayern having already qualified for Europe, they will play on the continent next year win or lose.
Stuttgart, who are 12th in the Bundesliga with five rounds left, will automatically qualify for at least the qualification round of the UEFA Europa League. They will reach the group stage if they beat Bayern in the final.
Stuttgart started with a series of chances straight away but Harnik shot wide left in the third minute and had other shots stopped by Freiburg keeper Oliver Baumann. The hosts did grab the lead in the ninth minute, though, as Ibrahima Traore collected a pass down the left wing and squared it into the middle where Boka hit home from 13 yards out.
Freiburg, who were making their first appearance in the cup semis, equalised just five minutes later with Max Kruse feeding a long ball to Rosenthal, who beat Stuttgart keeper Sven Ulreich with a low shot into the left corner. Stuttgart reclaimed the lead in the 29th minute as Christian Gentner crossed from the left side to Harnik, whose header went off the lower half of the crossbar and in.
The hosts continued to march forward with chances but Gentner's blast went just wide right in the 50th minute and Freiburg defender Pavel Krmas saved Vedad Ibisevic's shot on the goal-line three minutes later.
Freiburg were close to equalising in the 70th minute but Ulreich did a good job fending away Kruse's deflected shot, while at the other end Baumann kept Freiburg in the match by stopping Harnik in a one-on-one situation in the 86th minute.