Twelve people were rescued from their homes when a fire broke out in the early hours.
Emergency crews were called to Marina Road in Prestwick, Ayrshire, shortly after 2am.
The fire service said 12 residents were led to safety or rescued using ladders to reach the upper floors of the three-storey detached building.
Two people were treated for smoke inhalation.
An investigation is under way into the cause of the fire.