Marks & Spencer chief executive Steve Rowe is to step down in May after what the company called "six successful years" in charge.
Mr Rowe has battled to transform the fortunes of the high street stalwart - while closing stores and axing thousands of jobs.
He will hand over to new chief executive Stuart Machin, who currently leads the company's food business, and who will be assisted by Katie Bickerstaffe, who leads the clothing and home division and who will be known as co-chief executive.
Mr Rowe, whose father previously served on the M&S board, first joined the business at the age of 15, working at its Croydon store and, after a spell at Topshop, worked his way to the top of Marks & Spencer where he took over in 2016 as boss.
He will stand down on 25 May as the company publishes full-year results.
Announcing the departure, M&S said it had gone through a "remarkable period of change" under Mr Rowe's leadership and was now "in very different shape from the business he took over".
It was under his leadership that Marks & Spencer agreed a deal with Ocado to take the company's food division online for the first time and, the company said, doubled the online penetration of its clothing and home offering.
Mr Rowe also addressed the legacy of older unprofitable stores with a programme of closures that has so far seen 60 outlets shut their doors.
The 54-year-old has also had to contend with the major challenges presented by the pandemic, when lockdowns crushed the retail sector, as well as Brexit, which has created difficulties in supplying stores in the European Union.
Mr Rowe said: "It has been an enormous privilege to lead the business I love and have spent almost all my career working for.
"Leaving will be in many ways very difficult for me but I feel that after six hard years it is the right time to pass on the baton."
M&S chairman Archie Norman said: "Steve has been a magnificent servant of M&S.
"Coming from the shop floor to lead the business, he epitomises our values and has lived and breathed M&S for so many years.
"The M&S he took over was in parlous shape and throughout my tenure he has been fearless in grasping the nettles and facing into the challenges and has delivered massive progress."
M&S bounced back to profit - after a loss-making period caused by the pandemic - when it reported half-year results last autumn that were hailed as a sign that the "hard yards" of change were starting to pay off.
Since then it has also pointed to strong Christmas trading but warned, like other retailers, of inflationary pressures to come.
Sky News revealed in December that Mr Machin and Ms Bickerstaffe, together with finance director Eoin Tonge, were the three internal candidates to succeed Mr Rowe.
Under the new structure, Mr Machin will ultimately be in charge of day-to-day leadership while Ms Bickerstaffe will have a particular focus on the digital and data side of the business.
Mr Tonge will have a beefed up role as chief strategy and finance officer.
M&S has yet to disclose pay arrangements for the new leadership team.