Christian Gentner fired Stuttgart ahead on Sunday but Davie Selke equalised for the visitors early in the second half.
Daniel Ginczek headed Stuttgart back in front but Jannik Vestergaard levelled??again after the hosts had been reduced to 10 men by Martin Harnik’s red card.
But Stuttgart claimed an unlikely victory – only their third at home all season??- when Ginczek struck his second in stoppage time to take them above Hamburg in??the standings and three points from safety.
Cologne eased their own relegation worries in another entertaining encounter as??Hoffenheim’s top-six ambitions were handed a blow in a 3-2 defeat.
Matthias Lehmann and Anthony Ujah gave hosts Cologne a two-goal lead but Pawel Olkowski’s red card and Eugen Polanski’s penalty put Hoffenheim right back in contention.
But Jonas Hector restored Cologne’s two-goal advantage to make Anthony??Modeste’s late goal no more than a consolation for Hoffenheim.