Progress has been made at a Swindon hospital but further improvements need to be made, inspectors have said.
A report by the Care Quality Commission (CQC) rated Great Western Hospital's critical care and service effectiveness as good.
But problems with long delays and infection control contributed to the site being given an overall "requires improvement" rating.
Warnings were issued when the hospital was last inspected in 2015.
The Great Western Hospitals NHS Foundation Trust, which runs the site, was also given an overall rating of "requires improvement".
Its chief executive, Nerissa Vaughan, said while there was "still more to do" the trust was in "a much stronger position than eighteen months ago".
'Journey of improvement'
The inspection found areas including urgent and emergency services, surgery and medical care need to be improved.
The findings, following inspections in March and April, found A&E patients were experiencing long delays and frequently being cared for in corridors, while infection control was not always managed well.
However, the hospital was rated as "good" in some areas, including its critical care and the effectiveness of services.
Ms Vaughan said: "We've been on a journey of improvement for the last two years.
"It's one we are still on and one the CQC recognised as being 'underpinned by realistic goals'."
The chief inspector or hospitals, Prof Ted Baker, said he was "confident that the trust is heading in the right direction".
"But this is of little comfort to someone who finds themselves today waiting for urgent attention in an overcrowded emergency department," he added.