Aberdeen advanced unconvincingly into the quarter-finals of the Scottish Cup following a hard-fought 1-0 victory against Hamilton.
The visitors belied their lower League status as they more than matched the Dons throughout the 90 minutes. Aberdeen have to thank their goalkeeper Jamie Langfield for keeping them in the Cup as he produced a number of excellent saves.
The home side weathered the storm and scored the only goal midway through the second half, when an excellent defence-splitting pass from Barry Nicholson put Alexander Diamond through on goal and the centre-back kept his composure to slot the ball home.
Aberdeen had handed a home debut to England youth international Josh Walker, signed on loan during the transfer window from Middlesbrough.
Dons boss Jimmy Calderwood also included striker Darren Mackie who returned from injury to make his first start since 21 October.
Hamilton opened brightly and created a good early opportunity after only three minutes. Mark Gilhaney cut inside Stuart Duff before smashing in a fierce effort which Langfield did well to parry over the crossbar.
Minutes later, at the other end, Richard Foster worked a great one-two with Lee Miller, but as he drove in on the Hamilton goal his right-foot effort went straight into the midriff of Bryn Halliwell.
On 12 minutes Walker's 25-yard free-kick curled up and over the defensive wall but fell just wide of the upright with Halliwell beaten.
Aberdeen had a major let-off on 14 minutes when Tom Parratt's cross found Tony Stevenson who had drifted between the Aberdeen centre-backs but his downward header came crashing back off the post and Andrew Considine cleared the danger.
Darren Mackie's pace on 20 minutes saw him race onto a knock-down by Miller, where he tried an audacious lob which beat the visitors goalkeeper but also fell a yard wide of the far post.
Hamilton were showing no respect for their opponents as they continued to grow in confidence. Parratt fed the ball into the path of David Graham who advanced into the penalty area before firing in a low shot which was saved by the feet of Langfield.
In the 59th minute a careless mistake by Diamond presented Brian Easton with a chance, but his 20-yard shot was brilliantly blocked by Langfield at the expense of a corner.
Hamilton then had several close-range efforts blocked on the line by some desperate Dons defending.
Aberdeen undeservedly made the decisive breakthrough on 62 minutes. Nicholson's intelligent pass found Diamond who strode into the visitors area before clipping the ball into the corner of the net beyond the advancing Halliwell.
Walker had a great chance to cap a fine debut display on 77 minutes. A quick break by Derek Young led to him picking out the forceful run of the midfielder, but from 14 yards his weak effort was easily held by Halliwell.
Hamilton missed the last chance of the game in the final minutes when James Grady advanced onto a flick-on by Simon Mensing but, with the goal at his mercy, the much-travelled striker's weak effort was somehow palmed away by Langfield.