A block of flats was evacuated in Poole in the early hours of Thursday after fire broke out on the fifth floor.
It happened in Sterte Close at around 3am in the nine-storey block.
Emergency services were alerted after a caller said they were unable to escape.
One man was treated for smoke inhalation and all occupants were quickly accounted for.
Crews from Hamworthy, Poole and Westbourne attended.
A discarded cigarette is thought to have been the cause.
Incident Commander Dave Cooper said "The occupier was alerted to a serious fire in the lounge by his smoke alarm, he had a fire plan in place which at night meant that he closed the lounge and kitchen doors when he went to bed.
"This plan ensured that the fire was confined to the lounge and allowed him to escape this serious fire unharmed and he raised the alarm to alert others as he left the building."