BEIJING — The hospital in southern Beijing advertised itself as specializing in vascular tumors, especially benign birthmarks that often appear in infants.

But when a fire broke out there last month, killing at least 29 people, many of the victims had been there for another reason: They were older people with disabilities receiving nursing care, some of them staying at the private hospital for months or even years, even though it was not licensed as a provider of long-term elder care.

The tragedy at Changfeng Hospital — the deadliest fire in China’s capital in more than two decades — has renewed scrutiny of a long-running problem. China’s population is rapidly aging, with 400 million people, nearly 30 percent of the population, expected to be over 60 by 2040. But medical resources have not kept up; there were only about eight million nursing home or elder care beds at the end of 2020, according to official statistics.

The authorities have recognized the urgency of addressing the shortage, with Beijing’s latest five-year plan pledging to raise that number to nine million beds by 2025. But many obstacles remain.

Social stigmas against retirement or nursing facilities are still widespread in a culture that emphasizes children’s caretaking duties toward their parents. Even for people who are willing to embrace care institutions, public facilities often have long waiting lists, and private ones — which are not covered by public medical insurance — can be prohibitively expensive.

And then there is the problem of facilities becoming properly licensed to offer nursing care in the first place, a process complicated by bureaucratic requirements and a dearth of trained staff, according to experts. As a result, some private companies that want to meet the demand for senior care operate underground.

Local officials are now investigating whether Changfeng Hospital was illegally offering long-term elder care, according to state media reports. Some people who escaped the blaze told Chinese media that some patients’ limited mobility may have contributed to the death toll.

There is no clear link between the potentially unlicensed care and the fire; deadly fires have also broken out at licensed nursing homes. But the fire has drawn public attention to the underground market and the reasons for its existence.

Some victims’ relatives and public health experts have urged the authorities to look beyond punishment and toward bringing the providers out of the shadows.

“This is just the peak of the iceberg,” said Sabrina Luk Ching Yuen, a professor at Nanyang Technological University in Singapore who studies aging, adding that there were likely many similar cases of underground care. “If the market is there, what is the government trying to do?”

Efforts by The New York Times to reach victims or their relatives directly were unsuccessful. Changfeng Hospital has been closed to visitors since the fire, and when Times reporters tried to interview victims or their relatives at other hospitals where the injured were transferred, they were blocked or escorted out by hospital staff.

The authorities, as is common after disasters in China, have tried to control the narrative and prevent reporters from speaking with victims. They have said only that the patients who died ranged from 40 to 88 years old, with an average age of 71, and that most of the 21 seriously injured patients had chronic diseases.

But some Chinese news outlets managed to interview relatives of Changfeng Hospital patients, who described an elderly father who had been there since last summer because of disabilities after a cerebral hemorrhage, and another man, 76, who had no motor skills and lived there full time.

The relatives reportedly said they were drawn to the hospital because of its ability to provide medical care for their loved ones with disabilities. In contrast, nursing homes in China historically have provided little to no medical care.

The relatives also appreciated that bed turnover was less of a concern at private hospitals, which, though significantly more expensive than public ones, were less crowded. According to one report, one woman said that her father had been forced to shuttle between several different institutions before she found Changfeng Hospital.

That woman said she was paying about $870 a month in nursing fees for her father. Some online advertisements for a nursing facility at the same address as Changfeng Hospital listed fees as high as $1,400 a month. The average monthly pension in Beijing was 4,157 yuan, or about $600, in 2019.

Private hospitals have many incentives to try to capitalize on the unmet demand for long-term medical care, said Bei Wu, a professor of global health at New York University who has studied aging in China. Even before the coronavirus pandemic, many struggled to draw enough patients to make money, because of their heftier price tags.

Then, under China’s three years of strict Covid restrictions, people who could avoid hospitals did so. Out-of-town patients, who often traveled to major cities like Beijing for care, dwindled as the country sought to limit movement.

The publicly traded parent company of Changfeng Hospital lost more than $14 million between 2020 and the first half of 2022, according to public filings. It did not respond to multiple requests for comment.

“I can see some ways this pushed private hospitals to say, ‘Hey, we can provide the care for these older adults with disabilities because this can be a potential revenue-generating source,’” Dr. Wu said.

The government has, in fact, promoted the integration of medical and elder care, encouraging nursing homes to build medical facilities and hospitals to offer more nursing services.

But China, like many countries, has a dire shortage of staff trained to care specifically for older patients. And the government departments that oversee medical care and nursing care are separate, further slowing the approval process, said Professor Luk, in Singapore.

“The intention is good,” she said of the integration plan. “But, in reality, it’s really hard to implement.”

She said she hoped one outcome of the fire in Beijing would be a call to action for the government: Either it should provide more long-term care facilities itself, or make it easier for private companies to do so.

Indeed, the need is only going to grow. The number of older Chinese with disabilities is expected to more than double this decade, reaching 100 million by 2030, according to official statistics.

The facilities are especially important to the lucky few who have found spaces for their relatives there. Hua Ailing, a post office accountant in a small county in Anhui Province, chose to send her 89-year-old mother to a private hospital licensed for long-term care last year, after her mother lost the ability to walk. She said she felt more comfortable sending her there than to a traditional nursing home, where medical care could be unreliable.

If the option had not existed, she and her siblings would not have known what to do. “After a time, we couldn’t care for her ourselves,” Ms. Hua said. “After all, we’re all in our 60s, too.”

Joy Dong reported from Hong Kong. Li You contributed research.