Gordon Strachan was appointed Scotland manager in January 2013

Gordon Strachan has left his position as Scotland manager by "mutual consent", four days after the team failed to qualify for the World Cup.

The decision, taken in conjunction with the board of the Scottish Football Association, means 60-year-old Strachan leaves a job he took in January 2013.

Assistant Mark McGhee also departs.

"On behalf of the board I would like to thank Gordon for his excellent service to the national team," said Scottish FA chief executive Stewart Regan.

Strachan succeeded Craig Levein in the role, initially to oversee the end of the 2014 World Cup qualifying campaign.

Scotland's attempt to qualify for Euro 2016 began brightly but they ultimately fell short of reaching the finals in France.

Strachan and the SFA board agreed he would stay on to lead Scotland in the 2018 World Cup qualifiers, but a 2-2 draw in Slovenia on Sunday ended their hopes of finishing second in Group F and reaching the play-offs.

"I said on my first day as Scotland manager that it was the proudest moment of my career and that I wanted to put a smile back on the nation's face again," Strachan said.

"I share the profound disappointment at missing out on the play-offs, especially having worked so hard to fight our way back into contention.

"The players should receive immense credit for that resilience in coming back from a difficult start and I would like to thank each and every player who has come in to represent their country."

Scotland: I'm very surprised Strachan has decided to leave - Gordon Smith

Strachan said he and the players had shared "some magical moments" and the memories "will live with me for ever".

He added: "Of course, what made those moments special was the unwavering support of our fans.

"Through highs and lows you have stayed with the team and my biggest regret is not being able to provide the finals tournament you deserve.

"I would like to thank the board, the backroom staff and everyone at the Scottish FA for the help and support they have given me as national coach. It has been a real privilege."

The SFA board met at Hampden on Thursday to discuss the position of Strachan, whose contract was due to end next month. They will now begin the search for a successor.

"I know how disappointed he was that we couldn't secure a play-off place but to come so close was a tribute to the belief he instilled in his squad," Regan said.

"After almost five years the board felt it was time for a new direction to prepare for the Uefa Euro 2020 qualifying campaign and also the forthcoming Uefa Nations League.

"We are grateful to both Gordon and Mark for their efforts and wish them the best of luck in the future."

Scottish FA chief executive Stewart Regan, left, and president Alan McRae, right, were part of the board that discussed Gordon Strachan's future

Analysis - 'There was only ever going to be one outcome'

BBC Scotland senior football reporter Chris McLaughlin

There will be disagreements about the decision but few would argue that the news came as much of a shock. The SFA could not be seen to be rewarding failure and as the players trudged off the pitch in Ljubljana. It felt like the end, not only for their world cup chances, but for the manager.

He had come close to walking away in the past and the speed of today's decision was most likely aided by a reluctance from the man himself to carry on. The players loved him, the media tolerated him and the fans were split down the middle but ultimately the results dictated he couldn't carry on.

Yes, performances improved but ultimately it was two campaigns and two failures. There was only ever going to be one outcome.