ABERDEEN left it late to book their place in the quarter-finals of the Scottish Cup with a 1-0 win over Dunfermline thanks to an injury-time own goal by Neil McGregor.
The Pars, who dumped the Dons out of the competition in a quarter-final replay two years ago, looked set to hold out for a replay and were unlucky not to break the deadlock when an Andy Kirk's drive was tipped over the bar by Jamie Langfield.
The Dons, who have made a habit of getting knocked out of competitions by lower league sides in recent seasons, enjoyed a large amount of possession against the First Division side but rarely troubled Kyle Allison in the Dunfermline goal.
But deep in injury time they won the match when Chris Maguire's cross into the box was punched by goalkeeper Allison onto the unfortunate McGregor and the ball rebounded into the net to the delight of the home support.
Aberdeen will now face St Mirren in the quarter-finals following their late winner.