An NHS trust will take over the care of hundreds of patients being treated by a mental health provider that is under investigation by police and the Charity Commission.

The development comes after NHS England ordered the removal of all 287 inpatients from a hospital run by St Andrew’s Healthcare in Northampton over safety concerns earlier this year.

An inquiry was opened in June into safeguarding and financial concerns at the hospital.

Northamptonshire Healthcare NHS Foundation Trust will take over patient care from mid-September, subject to commercial arrangements.

The Charity Commission had previously opened a compliance case into the provider, which was then escalated due to “ongoing concerns”.

The charity, which was registered in 2004, first came to the commission’s attention in August last year after it submitted a serious incident report concerning potential mistreatment of patients, which it had referred to Northamptonshire Police for investigation.

St Andrew’s Healthcare and NHS England would “work closely” to ensure the transition is managed carefully for staff and patients, the healthcare trust said.

As part of the agreement, some of the buildings at the site will be leased to the trust.

Trevor Torrington, chief executive of St Andrew’s Healthcare, said patients were the “top priority”.

Angela Hillery, chief executive of trust, said: “We recognise the importance of these highly specialist services and the responsibility that comes with this agreement.”