Roberto Firmino's late goal gave Hoffenheim just their second win in six Bundesliga games as the hosts beat Eintracht Frankfurt 3-2.
A thrilling contest was settled in the 87th minute with a scrappy effort from the Brazilian as Hoffenheim moved above their visitors and into seventh.
Kevin Volland netted on the stroke of half-time to hand the hosts, who lost 1-0 at Borussia Dortmund last time out, the lead.
Stefan Aigner levelled 13 minutes into the second half before Adam Szalai restored Hoffenheim's advantage, which was again cancelled out by Haris Seferovic.
But Firmino had the last say to cap a thrilling encounter.
The home suffered an early blow when Niklas Sule went off injured, but their disappointment was assuaged by Volland's opener as he calmly rounded Frankfurt debutant Timo Hildebrand - once of Hoffenheim - to roll in the opener two minutes before the break.
Aigner's smart close-range finish put Frankfurt on level terms, but that lasted just seven minutes as Szalai was left with the simplest of finishes after Hildebrand had let Volland's shot through his legs.
In the 77th minute Seferovic was rewarded for his persistence in the box, managing to squeeze home an effort from a tight angle.
But that was not the end of the drama as Frankfurt failed to deal with a corner and Firmino prodded in the winner.