A mother and five children were rescued from their burning home after it is believed an electric cooker was left on accidentally, fire officials said.
A neighbour returning home from a night out heard screams coming from the property in Vicarage Place, Margate, Kent, just before 2.30am on Saturday morning.
The mother and five children were trapped on the first floor as fire spread from the kitchen, Kent Fire and Rescue Service said.
The neighbour smashed a small window with a shovel, entered the property and helped rescue the whole family who were taken to hospital for treatment for smoke inhalation. A dog was uninjured.
Neighbour Rob Blaskett told the BBC: "We heard screaming and shouting and looked out of the window and saw black smoke billowing out of the bathroom window and a young lady screaming out.
"Me and the wife went out and had a good look and ended up smashing the window and pulling the children through the window.
"There was two of us. There was another chap. He was leaning against the railings where the little window is and the mother was passing the children out."
Fire chiefs said it appeared a smoke alarm fitted on the ground floor failed to activate as the batteries may not have been inserted fully.
Margate watch manager Paul Ward said: "While we would always advise people not to enter a building that is on fire, the man's actions in rescuing this family were extremely brave and with considerable risk to his own safety."
Fire officials urged people to ensure they have working smoke alarms on each floor of their home and to test them regularly.