Derek McInnes’ departure ends the longest Aberdeen managerial tenure since the glory-laden era of Sir Alex Ferguson.

Having taken over a club in the doldrums, McInnes delivered a trophy and four runners-up finishes as he restored pride to a Scottish football giant.

Here, BBC Scotland recounts the games that came to define McInnes’ eight-year stint in the Pittodrie dugout.

Scottish League Cup final: Aberdeen 0-0 Inverness CT (aet, Aberdeen win 4-2 on pens) (16 March, 2014)

McInnes’ first full season provided a peak that would go unmatched by anything that followed as he ended Aberdeen’s 19-year trophy drought.

With 40,000 expectant Dons fans among the 51,000 crowd at Celtic Park, the excruciating wait went to a nerve-jangling conclusion.

Pittodrie skipper Russell Anderson’s volley off the post was the closest either side came before the men from the Granite City showed nerves of steel in the shootout.

Jamie Langfield saved from Inverness striker Billy Mckay, and Greg Tansey sent his spot-kick over the bar, before Adam Rooney coolly converted to send Aberdeen fans into raptures.

Aberdeen’s League Cup success was their first trophy since winning the same competition in 1995

Scottish Cup semi-final: St Johnstone 2-1 Aberdeen (13 April, 2014)

You wait two decades for a trophy then two come along at once. Well, that was the plan anyway. Just a month after hoisting the League Cup, Aberdeen found themselves 180 minutes from further glory.

With the Old Firm out of the equation – Dundee United had knocked out Rangers the previous day – two major stumbling blocks had been cleared and McInnes’ men were favourites in the Scottish Cup semi-final against St Johnstone, who had never won a major honour.

Aberdeen were on course for the final when Niall McGinn knocked home at Ibrox to reward their dominance before the break.

Yet a change of shape from St Johnstone flummoxed McInnes’ side, who had no answer to Stevie May’s double as St Johnstone marched on.

Europa League qualifying: Rijeka 0-3 Aberdeen (16 July, 2015)

Despite qualifying for Europe in each of his seven full seasons at the helm, McInnes was unable to smash the glass ceiling through to the group stage.

One of the most memorable scalps along the way came on the Croatian coast as strikes from Andrew Considine, Peter Pawlett and Kenny McLean stunned Rijeka 3-0.

Aberdeen completed the job at Pittodrie with a 2-2 draw to progress to a third-round date with Kairat Almaty. Dreams of mixing with Europe’s elite were quashed, though, as the Dons fell 3-2 on aggregate to the side from Kazakhstan.

Premiership: Aberdeen 2-1 Celtic (3 Feb, 2016)

Aberdeen – the last non-Old Firm club to win the Scottish title, way back in 1985 under Ferguson – had a genuine shot at being champions thanks to a rousing victory in this top-of-the-table clash.

Ronny Deila’s faltering Celtic saw their lead cut to just three points as a Jonny Hayes thunderbolt and close-range Simon Church finish sent belief coursing through the Pittodrie stands.

Leigh Griffiths’ late reply counted for nothing as McInnes’ team set up a grandstand finish to the season – only to wilt under the pressure, with six defeats in their final eight games leaving Aberdeen a distant 15 points adrift.

Scottish Cup final: Celtic 2-1 Aberdeen (27 May, 2017)

The culmination of a season in which Aberdeen were always the bridesmaid, finishing runners-up to Celtic’s ‘invincibles’ in every domestic competition.

The Dons, helped by their first win over Rangers at Ibrox in 26 years, had finished the league with 76 points – their highest ever top-flight points tally, but still 30 off the title pace.

That chasm was not reflected on the Hampden pitch as an even contest ensued after Aberdeen winger Jonny Hayes and Celtic midfielder Stuart Armstrong traded early goals.

But two minutes into injury time, Tom Rogic wriggled free to squeeze a shot past Joe Lewis. Celtic had made history with an unbeaten treble, Aberdeen’s catalogue of anguish was complete.

Tom Rogic’s injury-time winner was a cruel twist for Aberdeen

Premiership: Celtic 0-1 Aberdeen (13 May, 2018)

When McInnes finally got the better of Rodgers a year later, it was a hugely significant success.

The fourth consecutive – and final – runners-up finish of McInnes’ tenure was secured with a dramatic victory at Celtic Park on the closing day of the Premiership season.

Celtic had already been crowned champions, but Rodgers was condemned to a first domestic home defeat as Andrew Considine thundered home the only goal.

McInnes had confounded expectations Aberdeen would struggle after the departure of several key players including Hayes, McGinn, Ryan Jack and Kenny McLean, as he steered his team above Rangers and Hibs.

Premiership: Aberdeen 0-1 Motherwell (January 22, 2020)

Six years after Aberdeen lost 1-0 at home to Motherwell to hand the visitors second place, those pesky Lanarkshire upstarts struck again.

This time the sides were jostling for third place and Liam Donnelly’s header sent Motherwell four points clear. In a portent of Aberdeen’s troubles, they failed to create anything of note.

The defeat sparked a downturn that perhaps spelled the beginning of the end for McInnes as Aberdeen failed to score in five games running and won just two of their final nine league outings to finish fourth in the curtailed season.

Premiership: Hibs 2-0 Aberdeen (6 February, 2021)

While it was a goalless stalemate with struggling Hamilton that ultimately sealed McInnes’ fate, the tipping point came at Easter Road last month.

The pressure had been ominously building and rumours were rife all week that chairman Dave Cormack was running out of patience.

Aberdeen’s woes in the final third were again laid bare as Martin Boyle’s double proved decisive. It left the Dons with one win in seven and goalless in four matches in a miserable streak that would not improve.

McInnes’ men secured just one more victory – and netted once – in five further games before he left “by mutual consent”.

McInnes’ final BBC interview as Aberdeen boss