Seventeen people were evacuated by firefighters as the early-morning blaze told hold of the tenement building in Paisley.
Investigators were today working to establish what caused the fire.
It is understood residents were asleep in their homes, in Wellmeadow Street, when smoke from a burning shop below started seeping through the walls.
The drama began after 7am yesterday, when the fire broke out in the Shop Smart convience store.
Locals saw smoke pouring from windows, and emergency services, including 50 firefighters raced to the scene in Paisley's West End.
Emergency services ordered an immediate evacuation of the area and an exclusion zone was set up.
Moments after everyone had been evacuated flames burst from the roof of the top floor flat.
Fire crews battled the blaze throughout yesterday, pouring water from ladders and going into the block with hoses.
It took several hours to bring under control.
A Police Scotland spokeswoman said: "At around 7.10am on Sunday, we received a report of a shop on fire in Paisley.
"The four flats above were evacuated."
Police confirmed 17 people had been evacuated and none required hospital treatment.
Most families found alternative accommodation with friends and relatives and just a handful of people were given temporary accomodation.
A Scottish Fire and Rescue spokeswoman confirmed appliances were still at the scene yesterday dampening down the smouldering building.
Families were today waiting to find out when it will be safe for them to return to their homes, but it could take sometime before investigations are carried out.