Aberdeen ended their club record 14-game Scottish Premiership winless streak by edging Dundee and reclaiming third place.
In a frenetic, high-tempo affair producing a glut of chances, goals from Kevin Nisbet and Topi Keskinen proved decisive.
Nisbet converted after Kristers Tobers' back-post volley was saved by the legs of Jon McCracken.
Dundee had spurned chances through Simon Murray, Josh Mulligan and, most glaringly, Jordan McGhee, before Keskinen produced a wonderful second.
The Finn thundered a dipping howitzer beyond McCracken from 25 yards, sparking a sea of red and white euphoria in the stand behind the Dundee goal.
Within two minutes, though, Tony Docherty's men struck back; Mulligan's mazy run and clipped ball from the right diverted smartly home by Seb Palmer-Houlden.
The final half hour was chaotic. Palmer-Houlden and Finlay Robertson went close for the hosts, as Aberdeen scrambled the ball away from their goalmouth.
At the other end, Tobers bulleted a header which was brilliantly beaten clear by McCracken.
Dundee continued to threaten on the break, but lacked the clinical touch to make more of their pace, directness and haul of 23 shots.
They slip to 11th place, two behind Ross County, and six clear of basement club St Johnstone.