Rangers dominated for large spells at Hampden but their final ball and finishing let them down badly.

Steven Gerrard’s side applied more pressure as time ran out but they could not find an equaliser.

For all their chances, the Ibrox side had just one shot on target.

The final, on 2 December, will be 2014 winners Aberdeen’s fourth under Derek McInnes – a third in the League Cup – and will be against the side who beat the Dons in both domestic cup finals in 2016-17.

‘A dramatic & liberating moment’

In the opening 14 minutes, Aberdeen had a couple of moments that suggested that a big performance was on its way, both of them coming from McGinn. The first was a free-kick, tipped away by Allan McGregor. The second was a shot in the penalty box that should have tested McGregor to the maximum rather than flying over his crossbar.

The concerns among their supporters that Aberdeen do not deliver often enough in the big games would have come back in waves for large parts of the evening until Ferguson changed it all with the dramatic and liberating moment.

It was not that Rangers were creating golden chance after golden chance before Aberdeen scored, but they controlled the ball for large parts and pegged Aberdeen back. The problem was a singular failure to execute.

Without much threat up front in the absence of the suspended Alfredo Morelos and cup-tied Kyle Lafferty, Steven Gerrard brought in Umar Sadiq for his first start and he did reasonably well until getting booked late on for diving in an effort to win a penalty.

Rangers’ problem – and it would be the breaking of them in the end – was that they could not summon the accuracy to get themselves ahead.

‘Lacking football, but not incident’

Amid the maelstrom, there was a deeply worrying moment when Aberdeen’s Andrew Considine took an accidental blow to the head from Lassana Coulibaly. It took the medics six or seven minutes to tend to the defender and get him off the field on a stretcher. Later, thankfully, there was encouraging news of Considine’s condition in hospital.

This semi-final was without much cutting edge football, but it was not short of incident. McGregor took out Gary Mackay-Steven and was fortunate to avoid a booking. Then Rangers appealed loudly for a penalty, but referee John Beaton called it right – Graeme Shinnie’s tackle on Ryan Kent was good.

Rangers created some chances. Kent lashed one over. James Tavernier forced a save from Joe Lewis. Coulibaly touched one just wide from a corner. Kent, again, had an attempt deflected wide.

‘Aberdeen’s celebrations were loud and lusty… and will likely carry on for a while’

We were now in the 79th minute. McInnes had brought off Scott Wright – he could have removed the ineffective James Wilson just as easily – and sent Stevie May into the action. The Dons had a corner which McGinn swung in. There to meet it ahead of all others was Ferguson who nutted it past McGregor and then wheeled away like a man who had just won the lottery which, in a sense, he just had.

It was a stunning moment. Against the run of play, yes. Not that it mattered to Aberdeen. They were outnumbered in the stands – ‘Outnumbered but never outfought’ said one of their banners pre-match – but their celebrations were loud and lusty and they will carry on awhile.

Rangers tried to rescue it, but they never really threatened Lewis in goal. Gerrard watched on, possibly wondering what might have been had Morelos not got himself banned. They felt his loss.

McInnes, meanwhile, basked in the relief and joy of taking down an opponent that they had found hugely difficult to beat in recent times.

Another final beckons for his team. Next time, the full Aberdeen army will descend on Hampden. Of that, you can be sure.

‘Gritty performance’ wins day – analysis

Former Aberdeen captain and manager Willie Miller on BBC Sportsound

There’s many ways of winning games, but you don’t want to win like that – backs to the wall. If you can do it with a bit of flair, if you can do it with domination then that’s the way you prefer to do it.

They showed a lot of courage, determination, they dug in, they took everything Rangers had to throw at them.

Aberdeen go through to the final not on the back of a magnificent performance but on the back of a gritty performance, on the back of the manager making some changes up front that worked for him, on the back of taking the one chance that they probably had.

Rangers didn’t defend the corner. A midfield player gets up and sticks it into the back of the net so they’ve got what they deserved. They’ve dominated the game, they’ve got into good areas, they haven’t taken advantage of their play and then they’ve been hurt with the sucker punch at the other end.

Aberdeen deserve it. They’re delighted. They’re into a cup final and that’s all that matters. The performance is forgotten about already.