Scottish Fire and Rescue Service crews were sent to Royal Street in Gourock shortly after 3am in response to the first of several 999 calls made by members of the public.
Two appliances from Gourock Community Fire Station were mobilised along with an aerial rescue pump from Clydebank.
Group Manager Albert Bruce, the incident commander, said: "This was a significant fire and the crews in attendance drew on their skill and experience to bring the flames under control.
"At the height of the incident we had 10 firefighters operating in breathing apparatus as a systematic search of the building confirmed everyone was accounted for."
Group Manager Bruce added: "Although we cannot comment on the specific circumstances of this incident any fire in a residential building should remind us all to take action to help protect ourselves and those around us.
"We all need to ensure our homes are protected by working smoke alarms as these are absolutely life-saving devices that give people early warning of an emerging danger.
"These should be placed on every level of a property and tested on a weekly basis to make sure that in the event of a fire people have as much time as possible to get to safety and call 999."