Five wards at Dewsbury and District Hospital were evacuated this morning (Tuesday) after people noticed a burning smell.
Firefighters were called to the hospital in Halifax Road, Staincliffe, at 01.08am.
Three fire engines – two from Dewsbury and one from Batley – went to the site.
A team of 15 firefighters investigated a suspected fire in ventilation system ducting in the Ridings Building.
Mid Yorkshire Hospitals Trust’s chief nurse Sally Napper said: “As soon as we were alerted, we safely evacuated 39 patients from five wards across the hospital. No patients were adversely affected during this incident and all were transferred to vacant ward areas within the hospital.
“Ambulances were also diverted from Dewsbury to Pinderfields Hospital until 6.30am today.”
The wards affected were the Medical Assessment Unit, Short Stay Unit, Ward 8, Ward 14 and Ward 15.
No fire was found, but the ventilation system was shut down.
Crews were at the scene for three hours, and all affected wards have now reopened.
Ms Napper said: “We worked closely with the West Yorkshire Fire and Rescue Service and a senior engineer carried out a thorough investigation of the incident.
“The cause is believed to be a piece of equipment in the plant room which overheated, blowing smoke through the air conditioning system. “
“While no patients were harmed, we would like to apologise to those affected last night for any inconvenience that may have been caused as they were moved to other areas.
“We would also like to thank our staff for their very quick response to the incident and for ensuring the welfare and safety of our patients throughout last night.”