In line with the Dunedin Hospital's trial ''escalation plan'', the hospital had declared what the health board called a code black, meaning the situation was deemed critical.
Emergency operations centre incident controller Megan Boivin said the declaration of a code black meant the hospital had established a modified emergency operations centre.
Early this morning, there were 18 patients in the ED awaiting a bed, and only three beds were available on the wards.
Staff had worked hard to improve the flow of patients through the hospital and the situation had improved, she said.
But pressure on staff was "unrelenting" and staff continued to urgently work to manage the high occupancy within the hospital to allow patients to flow through the system in a timely manner, including those who present to ED, she said.