David Goodwillie secured an entertaining 3-2 Scottish Premiership win for Aberdeen as Dundee slipped to a fourth straight defeat.
Former Dundee United man Goodwillie did little to endear himself further to the Dens Park faithful with an excellent headed winner in the 64th minute.
There was an element of relief for Aberdeen manager Derek McInnes, who twice saw his side give away the lead before Goodwillie's decisive contribution moved them up to fifth.
Andrew Considine nodded a fifth-minute opener from Goodwille's cross before a fine Gary Harkins strike had Dundee back on terms almost instantly.
Dundee defender Jake McPake headed through his own goal in the 28th minute, but David Clarkson equalised once more with a second-half penalty.
Partick Thistle edge into seventh, ahead of Dundee on goal difference, thanks to a 3-1 triumph over a lacklustre Motherwell.
Stuart Bannigan fired a 16th-minute opener left-footed and Kris Doolan doubled Partick's advantage before the break.
A spectacular 30-yarded from Lionel Ainsworth got Motherwell back in the contest, but Stephen O'Donnell applied the finish to an 82nd-minute counter-attack to secure the points.
Motherwell drop to 11th below St Mirren after their fellow strugglers notched a second league win of the season thanks to Adam Drury's late winner at St Johnstone.
Jason Naismith drove home from distance to give visitors a 28th minutes lead before Steven Anderson headed in Lee Croft's corner midway through the second half to equaliser.
But St Mirren stole the points when John McGinn set up substitute Drury to finish three minutes from time.