FRESNO (CBS/AP) — A fire that broke out at an abandoned home in central California trapped a group of squatters who tried to flee out the only open window, killing five people and critically injuring another, authorities said.

Firefighters found the six victims in one of the bedrooms, where it appeared they were trying to smash a window to escape the flames and thick smoke engulfing the boarded-up home in Fresno on Sunday.

READ MORE: Fire Burns Inside Commercial Building In Downtown Petaluma

One of the sealed windows had been pried open, and that was the only way to get in or out of the house, Battalion Chief Lawrence French said. That’s also where the fire was the most intense, he said.

A neighbor told police he heard people screaming for help and pounding against a window, French said.

Four died at the scene, and the other died at a hospital. The injured person was reported to be in critical condition at Community Regional Medical Center.

The Fresno County coroner’s office identified three of the victims as Irene Hinojos, 36, Monique Amaral, 28, and Anthony Zavala, 37. The names of the others were being withheld until the families could be contacted, said spokesman Tony Botti.

READ MORE: Butte County Sheriff Searching For Man Suspected of Murdering His Mother

Zavala’s cousin, Juan Castillo Jr., told the newspaper that the victims were not homeless but sought the shelter of abandoned buildings to deal with personal issues and to keep warm.

“They do have homes. Some of us just have hard times and don’t know how to deal with it,” he said.

Fresno fire spokesman Pete Martinez said it looked like the victims may have died from smoke inhalation but that the cause of death has not been determined.

Investigators were looking for witnesses and video footage to determine the cause of the fire, Martinez said.

MORE NEWS: UPDATE: Oakland Officer, Suspect Wounded In Shootout; Suspect Surrenders After Tense Standoff

© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.