REPORT: Aberdeen 2 - 1 Hamilton
Aberdeen were made to work hard for a 2-1 victory over Hamilton as goals from Ash Taylor and Adam Rooney earned them victory in their final home game of 2016.
Taylor's opener was cancelled out by a Dougie Imrie penalty before Rooney grabbed the winner, with Hamilton having defender Scott McMann sent off in time added on.
The three points ensured the Dons kept up the pressure on second-placed Rangers in the Ladbrokes Premiership.
Accies pitched winger Louis Longridge into an unfamiliar wing-back role and he struggled to contain Aberdeen's Jonny Hayes almost from the off.
It was a Hayes cross that saw Aberdeen force their first corner, from which Andrew Considine headed Niall McGinn's delivery over the bar.
The Dons were in control for much of the first half, but Hamilton midfielder Darian MacKinnon drew a fine stop from Joe Lewis with a drive that had the former Peterborough man at full stretch low to his right.
Taylor saw his header from a right-wing corner saved by Hamilton's Gary Woods after 20 minutes and Rakish Bingham did well to get his body in front of Kenny McLean's follow-up.
Graeme Shinnie shot just wide and saw a later effort saved by Woods before the deadlock was finally broken.
MacKinnon brought down Hayes 25 yards out and the Irishman placed the resulting free-kick on to the head of Taylor, who found the corner of the net from 10 yards.
But, if that should have been a platform to build on, the Dons shot themselves in the foot just three minutes later.
Taylor's clearance was charged down by Danny Redmond, who then tried to round Lewis, only to be brought down by the goalkeeper. Referee Andrew Dallas immediately pointed to the spot.
Imrie confidently stepped up to send Lewis the wrong way with the spot-kick and level the scores.
The sides came out unchanged after the break and set about trying to nudge themselves ahead, with the play swinging from end to end.
The home side began to take control once more, but a loose pass from Shay Logan saw Bingham play in Ali Crawford, who was denied by an excellent one-handed save from Lewis.
The Dons eventually did restore their lead thanks to talisman Rooney.
He was well-placed and quick to react when Woods could only parry a shot from substitute James Maddison and fired home from close range.
The striker could have extended the lead just a couple of minutes later and there were further chances for Hayes and McLean as Aberdeen tried to make the points safe.
There was late drama as McMann was sent off for hauling Hayes to the turf in injury-time, with Woods making a fine double save to prevent the Dons extending their lead.