Aberdeen edged past Hamilton 1-0 away with returning midfielder Lewis Ferguson grabbing the only goal of the game.
Back after a two game suspension the 20-year-old netted a superb strike early in the first half to dump his former team.
It was a vital win for Aberdeen who were desperate to return to winning ways after suffering a 4-0 humiliation to Celtic at Pittodrie on Sunday.
Aberdeen boss Derek McInnes made three changes to the side that lost to Celtic.
In midfield Lewis Ferguson returned from a two game suspension and Craig Bryson was back in the starting line up having recovered from an ankle injury.
Welsh international winger Ryan Hedges also returned to the starting line-up.
Dropping out were Mikey Devlin, Jon Gallagher and Connor McLennan.
Hamilton created the first opportunity in the fifth minute when Mickel Miller was allowed a free header 12 yards out but his effort flashed wide,
The Dons threatened in the 10th minute when Niall McGinn picked out Sam Cosgrove with a cross but the Dons striker couldn’t get the ball under control and keeper Owain Fon Williams was able to gather.
Aberdeen went ahead in the 14th minute when Ryan Hedges played a free kick towards FERGUSON who allowed it to roll then rifled a 12 yard left foot drive into the roof of the net beyond keeper Owain Fon Williams.
It was a superb finish from the 20-year-old midfielder on his return to the starting line up having served a two game suspension..
In the 28th minute Cosgrove spun quickly at the edge of the box to unleash a shot but it took a late deflection to send it spinning wide.
On the half hour mark keeper Joe Lewis produced a superb diving save to touch a vicious 25 yard Lewis Smith drive inches over the bar for a corner kick.
Aberdeen came close in the 39th minute when Cosgrove latched onto McGinn cross but his flicked shot was straight at the keeper.
Moments later Cunningham fired in a shot that flashed inches wide as Hamilton threatened.
Midfielder Bryson was replaced with teenager Dean Campbell at half-time.
Aberdeen were the first to threaten after the break when Ferguson’ss powerful volley from the edge of the box was parried away by keeper Fon Williams.
McGinn followed up on the loose ball but couldn’t convert from an acute angle.
Moments later Ferguson fired a 22 yard free kick that slammed off the defensive wall and flew just wide.
In the 72nd minute McGinn shot from 25 yards but the effort went well wide.
The woodwork denied the Dons in the 82nd minute when Cosgrove rose to meet a Logan cross but his downward header hit the base of the post.
ABERDEEN: Lewis, Logan, Leigh, Considine, McKenna, Bryson, McGinn, Hedges, Cosgrove, Ferguson, Vyner.
Subs: Campbell (for Bryson 46), McLennan (for Hedges 71),
Subs not used: Cerny, Devlin, Main, Gallagher, Anderson.
HAMILTON: Fon Williams, McMann, Oakley, Miller, Gogic, Cunningham, Hughes, Martin, Stubbs, Smith, Hamilton.
Subs:Moyo (for Smith 60), Davies (for Cunningham 75),
Subs not used: Southwood, Hunt,, Beck, Mackinnon, Mimnaugh.
Referee: Willie Collum