AYR United almost pushed Premiership runners-up Aberdeen all the way in the Betfred League Cup clash at Somerset Park, however it wasn't enough as Aberdeen progressed thanks to a 2-1 win. 

The Dons looked set to cruise into the last eight when Northern Ireland man McGinn doubled their advantage following Daryll Meggatt's early own goal. 

But Alan Forrest – younger brother of Celtic's James Forrest - gave Ian McCall's team a lifeline before the interval and the Dons were made to sweat for their place in the competition as the former Dundee United boss met his former captain. 

Things could have gone a little more smoothly had their stand-out performer Wes Burns not seen two of his efforts come back off the crossbar and Aberdeen were forced to scrap their way through the closing stages. 

It was the Dons' third away match in just six days after trips to Maribor and Perth but there was no sign of tired legs in the opening stages as they swarmed over the Ayr defence. 

It took just three minutes for McInnes' team to force the opener. On-loan Bristol City winger Burns forced his way into the box but Meggatt was unable to get out of the way in time as the wide man's low cross rebounded off his shins into the net. 

Forrest had Reds keeper Joe Lewis scrambling when he tried his luck at an immediate response, but the former Cardiff man made it back in time to palm away his ambitious lob. 

But the Dons continued to threaten and scored their second on the half-hour mark when Kenny McLean fed the ball down the right for Shay Logan, who picked out a great cross for McGinn to slot first time into the far corner. 

Adam Rooney was only denied by the base of the post after throwing himself at Graeme Shinnie's cross from deep while a Burns shot squirmed wide as Ayr were opened up again. 

But the Honest Men were not there to be bystanders and fired themselves back into contention four minutes from the break. 

Lewis parried an effort from on-loan Burnley striker Jamie Thomas before Jamie Adams smashed his rebound against the bar. It was a mess as Aberdeen tried to get bodies in front of the ball but Forrest stayed calm as he made sure to finish in the corner. 

The Dons felt they merited a bigger half-time lead and set about re-establishing their cushion after the restart. 

Logan volleyed wide before Burns - so lively with his mazy runs - came close with three attempts. 

His first saw the Welshman surge 30 yards up-field before before crashing a powerful hit off the crossbar. He was denied again by home keeper Greg Fleming after meeting McGinn's cross with a firm shot before another bit of fancy footwork opened him space inside the box before the woodwork kept his shot out once again. 

But the longer the lead stayed at one the more jittery Aberdeen became. And their hearts skipped a beat when Andrew Considine appeared to bundle Adams over in the box. Referee Alan Muir was unconvinced, though. 

Considine had another scare when he lost possession late on but Ayr skipper Nicky Devlin wasted the chance when he skied over as Aberdeen progressed to the next round to host St. Johnstone. Ayr United now look ahead to Saturday's game away to Queen of the South. 

AYR UNITED: Fleming; Devlin, Murphy, Meggatt, Boyle; Crawford (Johnston 84'), Cairney, Adams, McGuiffe (O'Connell 74'); Thomas (Gilmour 60'), Forrest 

ABERDEEN: Lewis; O'Connor, Reynolds, Considine; McLean (McKenna 90+3), Shinnie, Jack; Burns, Rooney (Stockley 60'), McGinn 

Attendance: 2,653 

Referee: Alan Muir