Marks & Spencer has ousted its clothing boss after she failed to get a grip on the biggest job in high street fashion.

The departure of Jill McDonald was confirmed on Thursday and followed recent criticism of the performance of the retailer’s clothing ranges by M&S’s overall boss, Steve Rowe. He revealed that buying errors on her watch meant that at times key products such as jeans had sold out, resulting in the poorest stock levels “I have ever seen in my life”.

McDonald’s appointment in October 2017 had raised eyebrows in the first place because the high-profile businesswoman had no experience of the fashion industry. M&S is thought to have paid her a seven-figure signing-on fee in cash and shares as part of the move from the cycle and car parts specialist Halfords, where she had to leave behind £1.7m in bonuses when she jumped ship. The company declined to say whether the 55-year-old was receiving a payoff.

M&S is the UK’s biggest fashion retailer, with a clothing business worth more than £3bn.

McDonald, who was M&S’s clothing, home and beauty director, is leaving with immediate effect. Rowe will again take charge of the day-to-day running of the retailer’s clothing business, where sales have been falling for seven years. Prior to being promoted to chief executive in 2016, he had been running the division for close to a year.

In a statement confirming McDonald’s departure, Rowe said the executive had improved the quality and style of its clothing and “set a clear direction for the business to attract a younger family age customer”. However, he said the company needed to urgently address “longstanding issues” such as stock availability: “Given the importance of this task to M&S, I will be overseeing this programme directly.”

Earlier this week Rowe, had told shareholders at the company’s annual general meeting that mistakes had been made during a “troubled year” for its clothing business. He singled out a major jeans promotion in February that went awry after buyers failed to bring in enough stock.

Rowe said: “We have done much of the hard work on style and fit – it’s the process we need to change.”

He had previously complained that product lines – such as those promoted by the TV presenter Holly Willoughby – had sold out because M&S had not bought enough stock.

Against a backdrop off falling sales and profits, M&S is going through its biggest shake-up in 25 years as its hands-on chairman, Archie Norman, who joined in 2017, leads a large-scale overhaul of one of the UK’s biggest household names.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

Last year Norman, who is lauded for steering turnarounds during his career, including at Asda and ITV, said M&S was “on a burning platform … We don’t have a God-given right to exist and unless we change … in decades to come, there will be no M&S”.

M&S has embarked on a major store closure programme, with 120 of its full-line stores, which sell clothing and food under one roof, destined to close. At the same time, the 135-year-old mainstay of Britain’s shopping streets has started to flex its muscles online, getting into bed with the online grocer Ocado. M&S is paying £750m for a 50% share in Ocado’s retail arm and from autumn next year its products will replace Waitrose-branded goods in shoppers’ deliveries.

The independent retail analyst Nick Bubb was surprised McDonald had lasted close to two years as “she was an odd choice in the first place”. He suggested Rowe was also under pressure from Norman, who is keeping a close eye on the running of the business: “At least making a scapegoat out of Jill [McDonald] will give Steve [Rowe] a bit more time but it all has a bit of a doomed air about it.”