Stuttgart completed their second 2-1 victory over Freiburg in four days to move up to 10th in the Bundesliga and dent their local rivals' hopes of qualifying for Europe.
Christian Gentner and Vedad Ibisevic were on target for Bruno Labbadia's men with Ivan Santini's first Bundesliga goal not enough for the guests.
Freiburg remain fifth, one point behind fourth-placed Schalke, but with three sides within a point below them going into the last four games of the season.
Alexandru Maxim set up Genter for the first chance of the game in the 15th minute as the hosts made a bright start to the Baden-Wurttemberg derby.
Two minutes later, Max Kruse was denied by Sven Ulreich at the other end in an open and lively encounter.
The host took the lead in the 33rd minute when Martin Harnik lifted the ball into the area for Gentner, who was unmarked and had no problems heading in.
Nine minutes later, Ibisevic doubled the advantage with Harnik again the provider, putting the Bosnian through on goal before he did the rest with a composed finish past Oliver Baumann.
Harnik almost made it three just after the interval, but he was denied by Baumann in a one-on-one situation.
Santini reduced the arrears soon after coming on as a substitute, and shortly after Ibrahim Traore had hit the post at the other end.
There were five minutes left for Christian Streich's men to find an equaliser, but the home side held on to take all three points.