TOKYO -- A fire engulfed a group home for welfare recipients in northern Japan, killing 11 people and injuring three, police and fire officials said Thursday. Fire department officials said the residents were in their 40s to 80s, though most were elderly.

The fire broke out before midnight Wednesday in Sapporo, the main city on the northern island of Hokkaido. Five residents were rescued and three of them were being treated at a hospital for injuries that were not life-threatening, police said.

The three-story building was a "quite old" former inn rented by the operator of the "Social Heim" facility and did not have sprinklers, which were not required, fire department official Hiroyuki Sato said.

Get Breaking News Delivered to Your Inbox

Police so far identified the 11 victims only as eight men and three women. All 16 residents have been accounted for, said a police press official who spoke on condition of anonymity because they were not permitted to speak on the record.

The charred exterior of a senior persons welfare facility is pictured in Sapporo, Hokkaido, Japan Februray 1, 2018, in this picture obtained from social media. REUTERS

Noriyoshi Fujimoto, head of the support group that operates the dormitory, said he regretted it had no sprinklers. "I wish we had made the facility more properly equipped," he told Fuji News Network.

Most of the residents received welfare and paid 36,000 yen ($330) for monthly rent, Kyodo News agency said. It said some of the residents needed nursing care but the facility was unstaffed at night.

Footage on public broadcaster NHK showed flames and smoke pouring out the building as firefighters battled the blaze.

The cause of the fire is under investigation. Fire department officials said the damage was worst at the center of the first floor, where the kitchen, bathrooms and several guest rooms were. More single rooms were on the second floor.

The number of low-rent dorms has surged in aging Japan, often catering to the elderly poor and sometimes without adequate safety or hygienic conditions. More than 30,000 welfare recipients lived at nearly 1,800 such facilities as of 2015, about two thirds of them unauthorized, according to the Ministry of Health, Labor and Welfare.