Jim Jefferies has resigned as manager of Dunfermline Athletic after almost three years in charge.
His contract at the Scottish League One club was due to expire at the end of May, but he has opted to leave now.
The 64-year-old former Hearts boss has been at East End Park during which time the club entered and exited administration.
Head coach John Potter will take the first team until the end of this season, assisted by Neil McCann.
A club statement read: "Jim's intention had been to step aside at the end of the year with the team at the top of the league and pass the reins on to John and Neil, with whom he has worked closely over the last three seasons.
"Unfortunately, recent results have not been satisfactory, so Jim has decided that it is in the best interests of our club that he should step aside now."
|Dunfermline Athletic statement|
|"Unfortunately, recent results have not been satisfactory so Jim has decided that it is in the best interests of our club that he should step aside now."|
The Pars are fourth in the table, five points behind leaders Forfar and trailing Stranraer and Greenock Morton.
They lost 3-1 away to Airdrieonians on Saturday and were knocked out of the Scottish Cup by Stranraer in a fourth-round replay a week ago.
Jefferies had previously intimated that he would decide whether or not to retire when the current season ends.
The former Falkirk, Hearts, Bradford City and Kilmarnock manager succeeded Jim McIntyre when Dunfermline were at the foot of the Scottish Premier League with eight games to go of season 2011/12.
The Pars dropped into the then First Division and fell one league further when poor results and a 15-point penalty left them second bottom of the table and facing a play-off against Alloa Athletic, which they lost 3-1 on aggregate.
The Pars lost out on promotion to the Championship last season when, as runners-up to Rangers in League One, in the play-off final.
"There is no doubt that many other managers might have walked away from our club, faced with the difficulties in front of him," the statement added.
"Jim's influence, experience, dignity and leadership were an integral part of the efforts to save our beloved club from insolvency.
"We ask all Pars fans to remember this as Jim's legacy and he will, of course, always be welcome at East End Park."