An electrical fire destroyed a family's home early Saturday, killing a man, his pregnant wife and two of their children, authorities and family members said.

Jose Hernandez, his wife Aracely, a 13-year-old daughter and 1-year-old son died in the fire, relatives said. Aracely Hernandez was pregnant, said Jose Gomez, a brother-in-law who lives in the other half of the charred brick duplex.

Three other daughters, all teenagers, escaped the blaze and were taken to a hospital, said Gomez, who is married to Aracely Hernandez's sister. Gomez's family escaped unharmed.

The fire was determined to be accidental, York police officer Michael Koltunovich said in a statement. He did not specify how or where the electrical fire started.

Two firefighters were injured responding to the blaze, first reported just before 3 a.m.

Neighbor Joseph Murray said he awoke to screams coming from the home across the street. The house was engulfed in flames, he said, and a teenage girl was yelling from a third story window. Neighbors told her to jump and she did, Murray said.

"That's a scream you don't want to hear — somebody burning alive," Murray said.

Richard Saylor, assistant chief for York Fire/Rescue Services, earlier confirmed the number of deaths and survivors but did not release their names. The York County coroner did not immediately return messages.

A separate blaze in Gloucester, Mass., destroyed an apartment building and a synagogue, killing at least one person, authorities said.

The eight-alarm fire started late Friday in the four-story apartment building and spread to Temple Ahavat Achim. Both buildings were reduced to embers.

The buildings are just 50 feet from the fire department's headquarters, and firefighters were able to stop the blaze from spreading downtown.

One person was killed, Fire Chief Barry McKay told The Boston Globe, but he did not identify the victim.

The cause of the fire hadn't been determined, he said.