Danny Mullen struck the winner as Dundee came from behind to beat Hearts 2-1 at Tynecastle and move off the bottom of the cinch Premiership table.
The home side looked on course to tighten their grip of third place when they led at the break through Ellis Simms.
But a Toby Sibbick own goal early in the second half brought the visitors back into it before they claimed victory in the 78th minute.
Hearts made four changes to the side that started the 5-0 defeat at Rangers as John Souttar, Simms, Peter Haring and Andy Halliday replaced Cammy Devlin, Aaron McEneff, Alex Cochrane and Nathaniel Atkinson in the starting line-up.
There were also four alterations to the Dundee team that lost 2-1 at home to Ross County as goalkeeper Adam Legzdins, Vontae Daley-Campbell, Max Anderson and Niall McGinn made way for Ian Lawlor, Charlie Adam, Mullen and Josh Mulligan.
Hearts had the first clear chance of the match in the 18th minute when Beni Baningime played the ball wide to Barrie McKay and the little winger saw his low angled strike from the edge of the box pushed out at the near post by Lawlor.
The hosts went ahead in the 21st minute when Lawlor allowed a low Simms strike from eight yards to squirm through his body too easily after McKay surged forward and slipped the ball into the path of the big striker.
Dundee had their first notable attempt in the 25th minute as captain Adam curled an effort just over from 25 yards after Hearts failed to clear their lines.
The home side thought they had doubled their lead in the 32nd minute after McKay latched onto a lovely pass over the top from Haring and lifted the ball deftly over Lawlor but defender Ryan Sweeney got back to clear off the line.
Dundee attacker Paul McMullan then saw a shot from wide on the right pushed behind by Craig Gordon, and from the resulting corner - taken by Adam - Sweeney headed just over.
Hearts threatened again in the 36th minute when McKay and then Simms were denied by Lawlor in quick succession.
Dundee equalised in the 51st minute when Mullen ran onto a McMullan pass and fired in an angled shot that took a huge deflection off Sibbick's shoulder and eluded Gordon on its way into the net.
And the visitors snatched victory in the 78th minute when Mullen forced in a cross from substitute McGinn.