An Essex hospital has emerged from special measures despite recently recording some of the worst A&E waiting times in the country.
Princess Alexandra in Harlow has moved from an "inadequate" rating to "requires improvement" by the Care Quality Commission (CQC) over the course of 18 months.
Inspectors looked at six core areas during a visit in December.
A hospital spokesman said the new rating reflected "positive changes".
The hospital, which has 2,846 full-time staff, was originally placed in special measures in June 2016 after it was rated "inadequate" overall.
Its new grading comes three months after figures from NHS England revealed that only 67.3% of A&E patients were seen within four hours in December – one of the worst recorded in the country. The NHS target is 95%.
Following the inspection on 5 to 7 December, the specific rating for emergency services was upgraded from "inadequate" to "requires improvement".
A new hospital may be the only option
By Nikki Fox, BBC East health correspondent
Lance McCarthy was brought in as chief executive after turning around the fortunes of Hinchingbrooke Hospital in Cambridgeshire. The change in rating means the hospital will no longer need intervention from advisors at NHS Improvement.
However, it's still struggling with A&E performance. It was built to see 45,000 patients a year – and now treats more than double that. The numbers will only rise in future.
The Princess Alexandra Hospital is old. The 1960s infrastructure means there's no room in the basement for new pipework, so if they want to expand they have to go outwards, and there's no room on the existing site.
The hospital is now rated as "requires improvement" largely down to the hard work of staff and a change in leadership. But it's difficult to see how more fundamental improvements can be made unless the hospital moves to a bigger site.
Whether the government can come up with enough capital at a time when it's announcing pay rises for NHS staff and a wish to reduce costs across the health service is the big question.
Children's services, medical care and surgical services also still "require improvement", with critical care and end-of-life care both rated "good".
However, inspectors noted some "outstanding practice" in children's services, citing nurse-led discharges in the neo-natal unit.
A disposal and recycling system for medication in the critical care unit, which saved the hospital £1,200 in a month, was also praised.
'Not getting it right'
Prof Ted Baker, CQC's chief inspector of hospitals, said "dedicated staff" had demonstrated "significant improvement".
"This trust has to ensure it continues and consolidates this work and makes further changes so that people receive the care they should be able to expect," he said.
Chief executive of The Princess Alexandra Hospital NHS Trust, Lance McCarthy, said: "At the moment we're not getting it right for all of our patients all of the time, and we are not going to be satisfied until we do.
"Our ambition is to transform Princess Alexandra Hospital into an 'outstanding' trust."