The Dons gave everything at Hampden Park, taking the lead and forcing McGregor into several fine saves, but a fortuitous Rangers equaliser and a red card for Anthony Stewart that left Aberdeen playing extra-time with ten men was just too much for them to overcome.
Taking his Aberdeen team to Hampden for the first time, manager Jim Goodwin named an unchanged side after the 2-0 win over St Johnstone at Pittodrie last Saturday. Patrik Myslovic took his place on the bench for the first time after his recent move, replacing Shayden Morris.
After their 2-0 win at Tannadice last Sunday, Rangers made two changes, one at either end of the field, Allan McGregor and Alfredo Morelos replacing Jon McLaughlin and the injured Antonio Colak.
Rangers were nearly in front on four minutes. Working a corner back up the pitch, Tavernier swung in a dangerous cross looking that found Sakala eight yards out. His effort off his head and shoulder had the beating of Kelle Roos but fortunately it thumped against the post and bounced clear.
It was very much Rangers on the front foot in the opening period, the Dons unable to get a foothold in the game. Matty Kennedy got things moving in the right direction on 11 minutes, a diagonal ball that allowed Duk to chase it down and dart into the Rangers box before they were able to clear their lines.
Aberdeen were starting to settle around the quarter of an hour and some neat one touch football in the middle began to unpick Rangers. Ultimately the ball was slipped through for Bojan Miovski to get in behind and he produced a ferocious finish from a tight angle to beat McGregor, only for the goal to be disallowed for offside.
Graeme Shinnie was next, sprinting down the left and winning a corner on 18 minutes. From it, there was a real scramble in the Rangers box after Anthony Stewart won the first header, but the ball wouldn't come down for Duk nor then for Stewart and Rangers put it behind, somehow for a goal kick.
Sakala then produced some quality of his own on the edge of the box on 21 minutes, turning inside before getting off a rasping drive that flashed just over the bar. A second corner for Aberdeen followed two minutes later, Liam Scales heading just wide at the back post from Kennedy's delivery. It was a much more even game now, the Dons probably just shading it at this point.
Miovski was consistently getting the better of the Rangers defenders when the ball was pumped forward and he won another battle on 27 minutes before slashing his effort over the bar from the corner of the penalty area.
Tillman chopped Hayden Coulson in half on the half hour, surprisingly avoiding a yellow card for a cynical challenge. From the free-kick, it was Rangers on the break, Morelos dragging his shot wide of goal from just outside the box. Kent was next to try his luck on 33, his 20 yarder saved by Roos low to his left.
By now, the Hampden pitch was cutting up very badly, making life difficult for both sides.
Roos was called into action again on 36, Morelos getting a free header at the back post but he put it straight at Roos who saved and then flicked the ball away from him as he fell back into the net, Ylber Ramadani completing the clearance.
A golden opportunity, thankfully spurned. In a game that was swinging back and forth, it was Rangers who were just starting to get on top again.
Yet it was Aberdeen who snatched the lead on 41 minutes. Started by Stewart beating Morelos to the punch in the Aberdeen area, the ball came forward and Leighton Clarkson played it into the right channel. Miovski sensibly stopped given he was initially offside, the Rangers defenders stopping too. Kennedy galloped on past the statuesque Barisic to collect the ball and found a lovely cross into the centre where Miovski had chased forward to finish with a sumptuous left foot volley that left McGregor flatfooted.
Sakala got away from Shinnie as the first half headed into the three added minutes but he could only mkfire well wide from 25 yards. The Dons deservedly went into the dressing rooms a goal to the good.
HALF-TIME: ABERDEEN 1 RANGERS 0
No changes at the break for either side. By now, the Hampden pitch was cutting up very badly, making life difficult for both sides.
Excellent play between Coulson and Duk took the Dons from one end of the pitch to the other, winning a corner on 49 minutes, but that ultimately came to nothing. There was danger for the Dons on 52 minutes as Tillman dribbled through the box before setting up Jack some 20 yards out, but he obligingly hacked his shot into the crowd.
It was high octane stuff after the break, the tackles flying in and the game switching from end to end, Rangers trying to force the issue but with Aberdeen closing down and harrying, there were sounds of frustration coming from the Rangers fans, especially as another move where they'd penned the Dons in came to nothing on 58 minutes. Roos went down for treatment in the aftermath but was soon back on his feet.
Jack had more luck with another effort on 61 minutes, luck being the operative word. Kent played a nicely shaped pass into Jack who then worked a one-two with Morelos. His effort was going straight at Roos but a thick deflection off Scales diverted the ball into the bottom corner for 1-1. Jonny Hayes replaced Duk, seemingly struggling with an injury, ahead of the restart. Rangers had been preparing to bring on Arfield and Roofe before the goal, but they resumed their seats.
Aberdeen responded, Ross McCrorie driving forward and firing off a left footer that was bound for the bottom corner before it was deflected wide on 66 minutes. From the corner, another goalmouth scramble ensued but as in the first half, the ball simply wouldn't fall for the Dons in the box and Rangers eventually managed to bundle the ball away.
McCrorie went in the book for a trip on Kent on 70 minutes, a couple of moments after goalkeeping coach Craig Samson had also been cautioned.
Agony for Aberdeen on 72 minutes as a trademark Clarkson drive from 20 yards flew past McGregor but cracked against the post, Kennedy unable to turn the rebound into the goal, though he would probably have been ruled offside. Clarkson was injured in making the strike and was replaced by Connor Barron. Rangers withdrew Morelos and Tillman for Roofe and Kamara.
Rangers were clearly in the ascendancy now, Coulson finding a terrific block to keep a Tavernier shot at bay on 82 minutes. Aberdeen were battling ferociously but just unable to get the ball out of their own territory to get a breather. There was a break on 83 minutes as Ramadani took a clearance from Stewart on the side of the head and needed lengthy treatment before he continued.
Barisic went in the book on 87 minutes, Rangers' first caution, for an assault on Kennedy as he was chasing away from him. Kennedy reciprocated a couple of minutes later and was also booked.
Roos had to make a straightforward save on 90 minutes, Lundstram driving a low shot at goal from the edge of the box as we entered eight minutes of added time.
Good play from the Dons worked an opportunity, a clever back heel from Miovski giving Barron the chance to flash the ball through the six-yard box, but there were no takers for his cross-cum-shot.
Stewart was shown a straight red card on 92 minutes as he came across to challenge Sakala who proved too quick for him and got a touch on the ball out on the flank as Stewart came across. Aberdeen were able to deal with the free-kick as they looked to reorganise the ten men, Kennedy going to right-back, McCrorie at centre-half.
Rangers tried to force the issue, Kent flashing a curling dive just wide of goal in the 97th minute. Miovski was trying to get away on the break before Goldson took him out on the halfway line. Yellow card for what used to be known as the professional foul. And then we were into extra-time.
FULL-TIME: ABERDEEN 1 RANGERS 1
Christian Ramirez replaced Miovski as the game restarted, Wright on for Lundstram for Rangers. The players had to stand around in the freezing cold for several minutes because of a technical issue with VAR.
Two minutes into extra-time, Tavernier seized on a Scales clearance on the edge of the box. His shot deflected off Scales, looped over Roos but this time hit the bar and went over.
It didn't take long for Rangers to unlock the door though. Wright got away from Kennedy, darted to the by-line and pulled the back into Roofe on the edge of the six-yard box for him to turn the ball across goal and in. The game then had to stop again to deal with further technical issues with VAR. VAR was then abandoned.
The Dons weren't out of it yet though. In the 99th minute, Hayes pounced upon a loose ball 30 yards out, his swerving drive desperately clawed away by McGregor at full stretch.
On 103 minutes, the technical farce continued when it was announced that VAR was back after all, just in time to view Scales getting a vital block to divert a Sakala shot that looked goalbound. Aberdeen were defending heroically with the ten men, trying to stay in the game as another four minutes were added to the first half.
EXTRA-TIME HALF-TIME: ABERDEEN 1 RANGERS 2
Rangers brought on Arfield and Devine for Sakala and Barisic at the break.
Wright had a crack at goal from distance on 107 minutes, the ball thankfully flying just wide and smacking into the stanchion behind the goal. Moments later, Kent was the next Rangers man to escape a clear booking after hauling Coulson down.
In energy sapping conditions, the ten men were putting in an incredible shift and Shinnie was barelling into the box on 10 minutes before going down in the box under a strong tackle, nothing doing from the referee. Tavernier got something on the ball before clipping Shinnie.
At the other end, Roofe took a painful fall after a good tackle from Scales and was helped off the pitch, unable to continue, replaced by McCann. Aberdeen replaced Shinnie with Marley Watkins. McCann was booked for a horrible challenge on Scales on halfway within a minute of coming on. From the free-kick, the Dons loaded the box and Scales made a great contact with his shot, McGregor finding a fine save to keep his side in front.
As the game entered three minutes of added time, Ramirez was next in line, taking a shot on the turn but his standing foot slipped from beneath him on the treacherous pitch and the ball flew wide. Ramadani was booked seconds later for a foul on Kamara.
In the final minute, Aberdeen almost dug out an equaliser, breaking down the right. Watkins crossed, Coulson coming onto it at the edge of the box with a controlled drive that forced McGregor into another fine save to his right. Seconds later, the whistle went on the Dons' League Cup dreams for this season.