Stuttgart moved off the bottom of the Bundesliga thanks to a dramatic 3-2 win over Werder Bremen, a result which dented their opponents' hopes of qualifying for Europe next season.
A stunning opener from Christian Gentner was cancelled out by Davie Selke early in the second half.
Daniel Ginczek headed Stuttgart back in front before a red card for Martin Harnik complicated matters for the hosts, and they conceded another equaliser through Jannik Vestergaard.
Ginczek struck again in stoppage time, though, as Stuttgart picked up maximum points for only the third time at home this season, moving them above Hamburg in the standings, now only three points from safety and one behind Paderborn in the relegation play-off berth.
Stuttgart showed they meant business right from the off and Gentner's volley from the edge of the area in the 16th minute gave them a deserved lead.
Ginczek should have added a second just a few minutes later, but he was unable to make contact with a low cross just yards in front of goal.
Harnik also went close to adding a second with Stuttgart dictating the play, even though they only had a one-goal lead to show for it at half-time.
Selke was sent on by Viktor Skripnik at the start of the second half, and he made his mark on the game within five minutes, heading in Clemens Fritz's deep cross for his first Bremen goal since announcing he will be leaving the club for RB Leipzig in the summer.
Stuttgart did not let the goal get them down like they have so often this season and Harnik wasted a glorious opportunity to restore their lead when he shot over in the 61st minute, committing an even worse mistake a minute later when he shot wide of an open goal from four yards out.
He made amends in the 70th minute with the cross which Ginczek headed into an unguarded goal after Bremen goalkeeper Raphael Wolf misjudged his run out.
Harnik's otherwise miserable afternoon ended in the 84th minute when he was shown a second yellow card, and further punishment followed for his team when Vestergaard headed Bremen level for the second time with four minutes remaining.
That was not the end of the drama, though, as Ginczek snatched all three points for Huub Stevens' men in stoppage time, keeping his cool in front of Wolf with the pressure of a 51,000 expectant fans on his shoulders to beat the Bremen custodian and seal a crucial win for Stuttgart.