• Aberdeen had granted Sunderland permission to speak to McInnes • David Moyes resigned from Stadium of Light club on 22 May

Derek McInnes has turned down the opportunity to take charge of Sunderland and will instead remain as Aberdeen manager, the Scottish club have announced.

McInnes had held talks with the Wearside club, who are in the market for a new manager after David Moyes left last month following relegation from the Premier League.

Aberdeen announced the news on Thursday evening, with McInnes – whose assistant Tony Docherty will also remain at the club – now looking ahead to next season.

“I have ambitions in the game and while there was interest from elsewhere, and I did talk to Sunderland, I feel there is so much still to be done here at Aberdeen,” he said. “While we have lost players from last season, they will be replaced by signings of similar quality and our first challenge is to reach the group stages of the Europa League after coming so close in each of the last three seasons.

“Since the first day I arrived at Pittodrie, my biggest gripe has been the lack of training facilities and with progress at last on that front, it’s something I am keen to see through to its conclusion.”

It was on Wednesday that Aberdeen confirmed they had “reluctantly” granted permission for McInnes and Docherty to speak to Sunderland, with the Championship side reportedly willing to pay £1m in compensation.

Losing out on McInnes at this stage is a major setback for Sunderland, who have been without a manager since Moyes’ resignation on 22 May. The club sold their highly-rated goalkeeper Jordan Pickford to Everton on Thursday for £30m. Preston’s manager Simon Grayson and former striker Kevin Phillips remain in the frame to take over.

After the decision was taken to stay put, the Dons chairman Stewart Milne paid tribute to McInnes’ achievements since he took over in 2013.

“I am personally absolutely delighted that Derek and Tony have agreed to stay and have never doubted their commitment to the club,” he said. “Given what Derek has achieved here, there is inevitably going to be interest from other clubs and in making the decision to stay, he has demonstrated how much Aberdeen means to him.

“It is now up to all of us, the board, staff, players and supporters to show how much we appreciate having him at the helm by getting right behind him.”

Last season McInnes guided the Dons to a third successive second-placed Premiership finish, although they were 30 points behind the runaway champions Celtic. The 45-year-old former Rangers and West Bromwich midfielder has previously managed in England with a spell at Bristol City.