BETHEL — Investigators from the State Fire Marshal’s Office say electrical wiring in a first-floor wall caused the fire that engulfed a single-family home on Elm Street in Bethel early Wednesday, gutting the house and killing one of its residents.

Thirty-nine-year-old Joshua Piawlock died of smoked inhalation, said officials from the State Medical Examiner’s Office. Piawlock’s body was found in his second-floor bedroom and examined at a local funeral home.

The fire was discovered by Lucinda Bilodeau, 52, Piawlock’s longtime girlfriend, investigators said.

Bilodeau, who was treated for minor burns, escaped from the house by a first floor door.

The couple’s 18-year-old son, Eric, managed to crawl through a second floor window onto the porch roof to escape the blaze.

Both Bilodeau and her son suffered mild smoke inhalation.

There is no evidence that smoke detectors were working in the house, investigators said.