Dons boss Derek McInnes has signed a new contract that will see him stay at the club until summer 2020.
His number two Tony Docherty has also signed on for the longer term and will continue on in his role.
The news will come as a massive boost ahead of the club’s crunch Europa League second qualifying round tie against NK Siroki Brijeg in Bosnia.
McInnes had looked almost certain to leave the Dons just last month after opening talks with Championship club Sunderland.
However, in a remarkable turnaround, the 46-year-old has now pledged his immediate future to the Pittodrie Club.
Commenting on the news, Chairman Stewart Milne said. “I mentioned recently that Derek and Tony had demonstrated their loyalty to and ambitions for the Club when they elected to remain and this contract extension reaffirms that.
“This is great news for everyone connected to Aberdeen Football Club and gives us a real boost ahead of the new season.”
McInnes added: “We’re delighted to extend our contracts and both Tony and I are looking forward to the season ahead.
“We’ve still a lot to do both on and off the pitch and as I’ve mentioned on several occasions I want our tenure here with Aberdeen to be remembered fondly as a successful period and one where we were winning trophies.”
McInnes replaced Craig Brown as Dons manager in 2013 and the following year led the club to their first trophy in 19 years by winning the League Cup.
Aberdeen have finished second to Celtic in the Scottish Premiership for three years running under the Scot and were also runners up in last years Scottish Cup and League Cup.