Craig Brown has announced he will stand down as Aberdeen manager at the end of the season.
The club revealed he had agreed to continue his involvement with the Dons as a non-executive director.
In a statement on the Aberdeen website, Brown said: "Having reflected long and hard on the situation, I felt the time was right for me to step down as manager."
The 72-year-old took over at Pittodrie in December 2010 after leaving Motherwell but he has struggled to achieve lasting success at the club.
Brown, whose assistant Archie Knox will leave the club in the summer, added: "I feel it is important this is out in the public domain as I do not want anything to distract from the playing side over the next few weeks.
"Archie and I are determined to do whatever we can to help the team finish 2012-13 on a high and we strongly believe we will be leaving a solid base for the next management team to build on."
Although he led Aberdeen to two semi-finals - they were also in the League Cup semi-finals when he arrived - he could not secure a top-six place in the Clydesdale Bank Premier League last season after taking them away from relegation trouble in his first campaign.
And the announcement comes after a goalless draw with Motherwell on Saturday left Aberdeen in ninth place with three games left to the split.
The Dons are two points behind sixth-placed Hibernian but face Celtic at Parkhead on Saturday and look destined to finish in the bottom six for a fourth consecutive season since Jimmy Calderwood lost his job on the day he led the club into Europe.