Three men had to be rescued after a fire broke out at a landmark former Eye Infirmary.
Almost 30 firefighters were called to tackle the blaze on the first floor of the building on Compton Road in Wolverhampton as smoke billowed out onto the street.
Witnesses reported seeing the squatters enter the building 15 minutes before the fire broke out.
Crews discovered the trio in a room above the blaze and used a ladder to get them out of the building.
They were then treated by paramedics at the scene for smoke inhalation before being taken to New Cross Hospital for further treatment.
The Chapel Ash building – labelled as one of the worst eyesores in Wolverhampton – fell into disrepair after services were transferred to New Cross Hospital in 2007.
Supermarket firm Aldi is currently in discussions to open a new store there.
Residents gathered on the street to watch the rescue operation and described how they saw smoke filling the road in the wake of the blaze.
Wolverhampton Fire Station watch commander Tony Bucknall said: "There is no electrical supply to the building so the most probable cause was whatever people inside the building were doing."
The building suffered no structural damage as a result of the fire although a couple of rooms, already in a state of disrepair in the wake of its closure, were left smoke logged.