Eleven people died in a fire late Wednesday night at a lodging facility in Sapporo that housed impoverished elderly and disabled people, with only five residents surviving, police said.

The lodging in the northern prefecture of Hokkaido, which was totally gutted, was effectively functioning as a low-cost shelter for welfare recipients. Japan has about 1,700 such facilities, often used by elderly people unable to enter care facilities or rejected by apartment owners.

A total of 16 residents in their 40s to 80s were living in the decrepit three-story wooden home built on a 400-square-meter lot. Firefighters battled the flames that trapped residents in the building located about 1.5 kilometers north of Sapporo railway station, finally bringing them under control shortly before noon Thursday.

Eight men and three women died in the blaze that started around 11:40 p.m. Wednesday. Three others were injured, but they are not in a life-threatening condition.

The police are trying to identify the victims, many of whom were believed to be elderly. Of the 16 residents, 13 were receiving welfare, according to the local government.

Among them were dementia patients, people with no relatives and some needing assistance in daily life.

Noriyoshi Fujimoto, the head of the company that rented the nearly 50-year-old building and operated the facility, told reporters, "We thought we could deal with the blaze with fire extinguishers."

"Some of the residents could not eat or take a bath without the support of others so they may not have been able to escape," a senior member of the operating company said.

As the fire broke out, neighbors heard a scream from the home and some of them joined in rescue efforts.

A 70-year-old man said he dragged one resident away from the facility after he was found crouching in the snow after jumping from the second floor. The neighbor also saw a woman shouting for help on the first floor of the building and broke open the window grilles with a shovel to save her.

"I have heard there were residents who moved to the lodging after their family members died. I cannot stand (this tragedy)," said a 74-year-old man who runs a ramen shop frequented by residents.

A 64-year-old man who has entered the facility in the past said, "The aisle was narrow and the entrance only had a space for one person to pass."

According to the Ministry of Health, Labor and Welfare, 537 cheap or free accommodations for impoverished people were registered with the local governments across Japan as of June 2015. In addition, around 1,200 unauthorized similar facilities are also believed to be in operation.

About 15,600 people in total used the registered facilities, with 90 percent of them welfare recipients and 40 percent aged 65 or older. Due mainly to financial reasons, they cannot rent apartments or enter care facilities.

Yasuhiro Yuki, a professor specializing in social security at Shukutoku University, said such facilities are operating ostensibly to provide "temporary" lodging until the residents find new homes but the reality is often different.

"It is difficult for the elderly to find a place to move to and quite a few people have been staying at those facilities for years," he said.

Fire protection measures have been a challenge for facilities providing accommodation to low-income earners as they are generally made up of a cluster of small rooms. Facility operators are reluctant to spend too much money on equipment because it will lead them to charge higher rents.

"Support groups are usually scant of money and not many can enhance fire protection equipment or hire a building manager. We need public backup," said Nagao Morimatsu, a senior member of a nonprofit organization assisting the needy in Kitakyushu in Fukuoka Prefecture.

Deputy Chief Cabinet Secretary Yasutoshi Nishimura told a press conference that the government will consider what measures they can take to prevent similar disasters from occurring following the investigation by firefighters into the incident.