DEREK McInnes left Rangers stunned on Thursday night after turning down the opportunity to become the new Ibrox boss. 

The 46-year-old appeared set for a move to Glasgow after spending two days locked in talks with Pittodrie chairman Stewart Milne, but decided to stay put with the club he has transformed since arriving four and a half years ago.

Here, we look at some of the key events from his time with the Dons.

Read more: Steven Thompson: In pantomime season, Rangers fiasco really is no laughing matter

25 March 2013: Appointed Aberdeen manager

Aberdeen were in ninth place under Craig Brown at the time of McInnes’ appointment and it was agreed that he would succeed the retiring veteran boss after the split.

18 May 2013: Ends season in eighth place after five-game unbeaten run

McInnes began his tenure with four draws and a win, taking the Dons to an eighth-place finish.

14 March 2014: Signs new contract extension until 2017

16 March 2014: Wins League Cup

The Dons triumphed over Inverness Caledonian Thistle in the final on penalties after neither side could find the net in 120 minutes of football.

It was the club’s first trophy in 19 years and the first final they had reached in 14 years.

13 April 2014: Beaten by St Johnstone in Scottish Cup semi-final

5 May: Wins Scottish football writers’ manager of the year, a week after being named PFA Scotland manager of the year

11 May 2014: Finishes third in Scottish Premiership                                                                  

A final day defeat to Motherwell thanks to a 93rd minute winner from Craig Reid saw the Dons slip from second place in the final moments of the season. Despite that, the achievement marked Aberdeen’s first European qualification in five years.

7 August 2014: Aberdeen knocked out of Europa League by Real Sociedad

McInnes’ first European campaign ended with a 5-2 aggregate defeat to the La Liga outfit in the third qualifying round after wins over Daugava Riga and Groningen.

31 January 2015: Beaten by Dundee United in League Cup semi-final

12 June 2015: Signs two-year contract extension until 2019

24 May 2015: Finishes second in Premiership

At the second time of asking McInnes secured second place, 10 points ahead of Caley Thistle in third but a distant 17 points from champions Celtic. It was the club’s highest league finish in 21 years.

6 August 2015: Aberdeen exit Europa League at third qualifying round

After progressing past FK Shkendija and Rijeka in the first two rounds hopes were high, but a 3-2 aggregate defeat to Kairat of Kazakhstan saw the Dons fall at the third hurdle again.

8 May 2016: Dons lose to Celtic to ensure league title was going to Parkhead

A 3-2 defeat at Celtic Park meant Ronny Deila’s side sealed a fifth consecutive league title with two games to spare, despite a second half fightback from the Dons.

McInnes’ side mounted a stern challenge throughout the season, but a poor end to the campaign in which they lost six games from eight saw them finish a distant 15 points behind Celtic in second.

4 August 2016: Maribor end Aberdeen’s Europa League run at third qualifying round

The Dons fell at the same stage for the third year in a row, losing 2-1 to Maribor on aggregate after victories over Fola Esch and Ventspils.

27 November 2016: Aberdeen lose League Cup final to Celtic

A 3-0 defeat at Hampden Park proved to be the first of two cup final defeats to Brendan Rodgers’ Invincibles.

4 April 2017: McInnes surpasses Sir Alex Ferguson’s home win record with victory over Inverness

A 1-0 win over Caley made it 10 home league wins in a row for the Dons, overtaking the record set by Fergie’s side in 1986.

21 May 2017: Aberdeen finish as Premiership runners-up for third year in a row

The Dons completed the league campaign with a 6-0 victory over Partick Thistle, a result that saw them finish nine points clear of Rangers in third but 30 points behind the unbeaten champions.

27 May 2017: Dons lose to Celtic in Scottish Cup final

Tom Rogic’s dramatic late winner saw the Dons succumb to Celtic once more in the final of the Scottish Cup. Aberdeen finished the 2016/17 campaign as runners-up in both domestic cups and the Premiership.

15 June 2017: Turns down Sunderland to stay at Aberdeen

McInnes rejected the opportunity to manage the recently relegated English Championship club, stating that ‘there is still so much to be done here.’

18 July 2017: Signs one-year contract extension until 2020

3 August 2017: Dumped out of Europa League in second qualifying round by Apollon Limassol

McInnes led his side past Siroki Brijeg before being knocked out by the Cypriot side 3-2 on aggregate.

3 December 2017: Aberdeen lose to Rangers for second time in five days

The Dons suffered back-to-back defeats to the Gers at Ibrox and Pittodrie, slipping to third place on goal difference amid speculation of an imminent Rangers approach for McInnes.

7 December 2017: McInnes rejects Rangers job

Rangers persisted with their pursuit of McInnes after having their first approach knocked back and the 46-year-old spent two days locked in talks with chairman Stewart Milne. 

He then left the Gers reeling by deciding to stay put in Aberdeen, saying 'I'm pleased to be now totally focusing on purely on the field matters."