A gas leak forced the evacuation of eight wards at a hospital after contractors ruptured a pipeline with a digger during works at the site.
Patients, staff and visitors were all evacuated from the wards of the Royal Devon and Exeter Hospital yesterday afternoon, and at one point bosses feared they may have to clear the whole site.
Hospital managers declared a "major incident" when the alarm was raised.
Outpatient appointments were stood down and all non-urgent operations were cancelled as the hospital went into emergency mode to deal with the incident.
Chief executive Angela Pedder said: "Our staff responded in a professional and effective way to this incident, and evacuated patients were well cared for until they could be taken back to their own ward areas.
"Our emergency response plans were implemented in close partnership with the emergency services, and the wider NHS health community.
"We apologise for the disruption this may have caused for outpatients and visitors, but appreciate their co-operation with the safety measures we put in place. Our priority now is to resume business as usual as soon as possible from tomorrow."
The hospital declared a major internal incident at 1.15pm when the gas leak was reported outside, near the entrance of the Princess Elizabeth Orthopaedic Centre.
Patients on wards were evacuated to other ward areas within the main hospital building as a safety precaution.
Residential staff accommodation on the site and orthopaedic theatres were also evacuated and the area was cordoned off by the fire service.
Gas repair engineers arrived on site and a major incident was declared at 2.30pm because of the disruption to normal hospital services. This was a precautionary measure because of concerns that wider hospital evacuation may have been required.
The hospital stood down the major incident status at 4.30pm and a recovery plan was set in place to return all patients to their wards.
The hospital asked the public to stay away last night if their visit was not essential, to allow staff to concentrate on resettling patients after the day's drama.
It is understood contractors working on site on behalf of the water company damaged a gas supply pipe and caused a leak.
Devon and Somerset Fire and Rescue Service said crews were using water jets to "cool" the gas, while engineers worked to stop the leak. No-one was injured during the incident.