The chief executive of a troubled NHS trust has quit over "media attention".

Katrina Percy said "the effect ongoing personal media attention has had on staff and patients" had made her position as boss of Southern Health NHS Foundation Trust untenable.

Ms Percy had faced calls to quit after the trust was criticised over the way it investigated patient deaths.

An NHS England-commissioned probe found 272 of the 722 deaths over the last four years were dealt with properly.

Ms Percy, who was chief executive for nine years, said she "firmly believed" it was her responsibility to stay on to "oversee improvements".

She said she understood why "many will say I should have stepped down sooner given the very public concerns which have been raised in the past months".

Salary remains

Ms Percy said she was taking on a new role with Southern Health providing "strategic advice to local GP leaders".

A spokeswoman for the trust said Ms Percy's salary - which is quoted in the trust's annual report as between £180,000 and £190,000 - would remain the same when she moved to the advisory role.

Image copyright JusticeforLB Image caption Connor Sparrowhawk, 18, who died at Slade House, had epilepsy and experienced seizures

In June, Southern Health accepted responsibility for the death of 18-year-old Connor Sparrowhawk, who drowned in a bath at one of its facilities - Slade House in Oxford.

The trust admitted it caused the death of Connor, who had suffered an epileptic seizure before he died in July 2013, and offered his family £80,000 compensation.

Analysis by Michael Buchanan, BBC News Social Affairs Correspondent

So Katrina Percy has finally accepted what most people concluded months ago, that her position was untenable.

Beyond the many failures publicly reported, the trust were having to deal with a more insidious problem - patients turning up for routine appointments asking clinicians if they really were getting the best treatment.

Trust in the trust had gone and rightly or wrongly, Ms Percy, the only CEO they'd ever had, was the face of that failing.

But even while acknowledging that her position was untenable, the chair of the trust has agreed to pay Ms Percy the same salary in her new post, about £190,000. That raises serious questions about Tim Smart's judgement - no one I've spoken to, inside or outside the trust, can understand that decision.

At almost every turn over the past year or so, when Southern Health have had an opportunity to do the right thing, they have invariably chosen a different course. Even with Katrina Percy's resignation, that appears to be a continuing issue.

A report published in December said the deaths of hundreds of mental health and learning-disability patients over four years were not properly examined, and blamed a "failure of leadership".

Following a six-week review, interim chair Tim Smart said it was clear the executive team had been "too stretched to guarantee high quality services".

He recommended the trust should "transform the way in which it delivers services, and makes changes to the structure and strength of its leadership team".

Media playback is unsupported on your device Media caption Sara Ryan says Ms Percy should have stepped down earlier

Connor's mother Sara Ryan said Ms Percy's resignation was "long overdue" and that the former CEO was still not taking responsibility for the trust's failings.

'Scandalous and shameful'

"This whole sorry episode has shone an important light on peculiar workings at senior NHS levels around regulation, accountability and enforcement," she said.

"It also demonstrates that candour and transparency remain woefully lacking in 2016."

Ms Ryan added that it was "totally scandalous and shameful" that she would keep the same salary in her new role.

Mr Smart said Ms Percy's new role was "vital work that needs to be done for which she is ideally suited".

"Katrina has shown great resilience, devoting herself to the patients and staff of Southern Health since it was created in 2011," he added.

Julie Dawes, who joined the trust in May as director of nursing and quality, has been named as the interim chief executive officer.

In July, a BBC investigation found Southern Health had paid millions of pounds to companies owned by previous associates of Ms Percy.

One firm received more than £5m despite winning a contract valued at less than £300,000, while another was paid more than £500,000 without bidding at all. The trust said it took its financial responsibilities "very seriously".

Southern Health NHS Foundation Trust covers Hampshire, Dorset, Wiltshire, Oxfordshire and Buckinghamshire.

Southern Health Timeline

July 2013 - Connor Sparrowhawk, 18, drowns after an epileptic seizure at Oxford unit Slade House. An inquest later rules neglect contributed to his death

11 December 2015 - The BBC reveals details of a leaked Mazars report which highlights a "failure of leadership". Jeremy Hunt says he is "profoundly shocked"

17 December 2015 - The report is officially published and shows out of 722 unexpected deaths over four years, only 272 were properly investigated

6 April 2016 - The Care Quality Commission (CQC) issues a warning notice to significantly improve protection for mental health patients

29 April 2016 - A full CQC inspection report is published, which says the trust is continuing to put patients at risk

30 June 2016 - Following a review of the management team competencies, it is announced that Katrina Percy is to keep her job

29 July 2016 - The BBC reports that the trust has paid millions of pounds in contracts to companies owned by previous associates of Katrina Percy

30 August 2016 - Ms Percy announces she is standing down