Nine people were treated in Perth Royal Infirmary accident and emergency unit after a gas cylinder leak in the hospital’s boiler room.
Emergency services were scrambled after an NHS worker was overcome by fumes, prompting calls for a full evacuation.
Staff said explosive chlorine dioxide was escaping from a disused water treatment unit in a room close to the stroke rehabilitation ward.
Firefighters wore protective suits to enter the affected boiler room, while staff were warned they may have to vacate nearby wards.
However, an evacuation was ruled out once the cylinder was removed from the building and air in surrounding rooms was tested and found to be safe.
Nine people were treated as a precaution: eight members of staff and one visitor.
At its height, a total of 25 firefighters from Perth, Dundee and Forfar were involved in the operation.
Crews were called to the Taymount Terrace entrance at about 12.35pm.
At the scene, Kingsway East station manager Craig Thomson said: “It looks like only a minimal amount of gas had escaped.”
He added: “After the unit was removed from the building we took samples of air in the neighbouring wards. They were found to be clear, so there was no need for an evacuation.”
As well as three crews from Perth, an environment protection unit was drafted in from Forfar and a detection and identification monitoring team from Balmossie.
Firefighters set up a decontamination tent in the hospital car park to clean themselves after visiting the plant room.
Ambulance crews also attended, and the incident was brought under control at approximately 2.30pm.
If breathed, the chemical can cause irritation in the mouth, nose and lungs.
An NHS Tayside spokesman said: “The leak of chlorine dioxide was discovered at lunchtime today in a boiler room at the hospital.
“No in-patients were affected and no patient areas were evacuated. However, visitors to Tay Ward and the stroke unit were sent home while the incident was ongoing during afternoon visiting hours.
“Ward staff have been contacting families to advise them of the visiting arrangements for this evening, and it is anticipated visiting will resume as normal tomorrow.
“NHS Tayside will carry out an incident review in line with normal procedures.”