LANCASTER, Pa. (AP) — Two young girls are being treated at a Pennsylvania hospital for serious burns after a fire broke out in their bedroom as they slept.

Lancaster fire officials say the girls, ages 5 and 8, were carried out of the burning room early Tuesday by their father. He then went back into the home to try to contain the flames before fire crews arrived.

READ MORE: Triple Shooting In Philadelphia Leaves Man Dead, 2 Women Coming Out Of Church Injured, Police Say

Investigators say the fire started just a few feet from the older girl, who suffered more severe injuries.

READ MORE: Philadelphia Police Investigating Kensington Double Shooting That Killed Man, Injured Woman

The girls were taken to a burn center in Allentown for treatment.

State police have ruled the fire an accident. They blamed it on an electrical problem.

MORE NEWS: Philadelphia Firefighter Injured During House Fire In Nicetown

(Copyright 2017 by The Associated Press. All Rights Reserved.)