A mental health trust warned over safety failures after the death of a patient has made progress but needs to improve further, inspectors said.
The Care Quality Commission (CQC) inspected Tees, Esk and Wear Valleys NHS Foundation Trust's acute inpatient wards and psychiatric intensive care units in May.
Inspectors found it was no longer inadequate but required improvements.
The trust said it was pleased but there was "still work to do".
A previous visit in January found people were being put at risk of harm.
Brian Cranna, the CQC's head of hospital inspection for mental health, said positive steps had been taken in the assessment, management and monitoring of risks to patient safety at locations including Middlesbrough's Roseberry Park, Darlington's West Park Hospital and Durham's Lanchester Road Hospital.
But he noted there was "still work to be done" to ensure a long-term turnaround.
He said: "A lot of the issues we found at our previous inspection related to the environment being unsafe.
"At this inspection, we found leaders had worked to make sure points people could use to harm themselves had been removed or steps taken to reduce the risks around them, and staff we spoke to were clear about this.
"However, staff weren't always following new policy."
One example, the watchdog said, saw workers fail to lock a window that presented a potential ligature risk.
However, it said it "no longer had significant concerns around systemic failures in how senior leaders were managing patient risks" and the trust had "better systems in place to comprehensively assess and mitigate patient risk".
Additionally, an effective procedure and process is now in place to review and learn from serious incidents.
Five people in the care of the trust have died in recent years, while former patients previously told the BBC drug dealers delivered crack cocaine to vulnerable patients.
Brent Kilmurray, the trust's chief executive, said: "While we are pleased that the improvements have been recognised, this is just one step on a longer journey to change.
"Our staff have worked tremendously hard to provide a safer, more caring, and compassionate environment for everyone involved with us.
"However, we know that there is still work to do and we are committed to continually improving the experience for people in our care, their families and carers and our staff."