Lori Ferrante has a lot on her mind.

She oversees Elizabeth Seton Residence, one of the highest-ranked nursing homes in the state, which historically has meant stable finances and a long wait list to get in.

But the wait list has shortened in recent years, and while occupancy rates are regularly higher than industry averages, Ferrante nonetheless finds herself regularly checking the nonprofit’s bank accounts to ensure enough money is available to cover payroll.

“I didn’t need to do that six years ago,” she said. “There’s no cushion right now.”

The story is typical for nursing homes across the state, and it gets considerably worse. Within the last year, 20 facilities have shuttered, and at least 190 have closed in the last two decades. The closures happen for various reasons, but most are money-related. Some of the closed nursing homes, which accounted for more than 1,900 beds, were located in in Brewster, Brockton and Framingham, among other places, according to the state. And the impact could have long-term repercussions.

Nursing facilities in recent years have received less money from the state for long-term care covered by Medicaid, a publicly funded health insurance program for people with low incomes known in Massachusetts as MassHealth. At the same time, organizations face stiffer competition from home- and community-based care organizations amid an ongoing shift in demand for end-of-life care.

Advocates warn the industry’s future hangs in the balance.

“Nursing facilities by every indicator are teetering on the edge,” said Tara Gregorio, president of Massachusetts Senior Care Association based in Waltham. “We need to be concerned about this.”

Increasingly, older adults are trying to stay out of nursing homes, choosing assisted-living facilities with augmented care, or “age-in-place,” meaning getting old at home and paying for in-home nurses and other health care professionals.

The trend is being incentivized by the state and federal government. In 2005, the federal government passed legislation making it easier for home- and community-based health care providers to qualify for long-term Medicaid dollars for older adults. And the results are measurable. Three decades ago, the lion’s share of Medicaid for long-term care -- about 90 percent -- went toward nursing homes nationwide. The rest went toward home- and community-based care.

Today, less than 50 percent of that money goes toward nursing homes nationally, and the number falls below 30 percent for long-term care facilities in Massachusetts, according to Truven Health Analytics and the AARP.

At the same time, as more adults try to stay out of nursing homes, occupancy rates -- or beds filled -- have fallen, meaning less money is coming in. Less revenue results in layoffs and reduced staffing levels, which is bad news for nursing homes where three of every four dollars are spent on personnel.

Understaffed facilities with high turnover almost always lead to lower quality of care, which is measured by rating agencies, further deterring individuals and families from wanting to enter a particular facility, or send their loved ones there.

The downward spiral of the nursing home industry is happening across America, but the dynamic is exacerbated in Massachusetts, where organizations are reimbursed for long-term care costs based on estimates created in 2007. The outdated rates mean reimbursements don’t account for inflation, health-care cost increments for employees or the rising minimum wage. While Medicaid is a federal program, it’s administered by states.

The industry estimates nursing homes lose $38 per day per resident covered by Medicaid in the Bay State. The gap translates into an underfunded amount to the tune of $38 million, according to Gregorio.

Of the 20 nursing facilities that closed over the last year, 14 received more than 70 percent of funding through Medicaid.

To try and offset losses incurred by providing care to Medicaid patients, nursing facilities have tried to attract private dollars from families. But that’s tough when there’s so much competition from newer assisted-living facilities that don’t come with the same stigma as nursing homes.

Meanwhile, Medicare dollars -- which cover health care costs for adults 65 years and older and reimburse nursing homes at a higher rate -- have also become more difficult to come by since the passage of the Affordable Care Act, also known as Obamacare. The law -- in an attempt to reduce costs for unnecessary care -- calls for brevity when it comes to short-term rehabilitative stays at nursing homes.

Without change, the nuances of nursing-home finances puts the industry on a downward trajectory with no clear end in sight. And on the surface, it could simply look like symptoms of a dying industry in a changing economy. But nursing homes under the current health care system still provide a vital source of care in Massachusetts, which Gregorio calls a “safety net.”

Indeed, thousands of Bay Staters have reached a point where they or their loved ones have decided around-the-clock care is what’s necessary, and nursing homes provide care for 40,000 residents on a daily basis in the Bay State.

Dorothy “Dotty” Lynch, who grew up in Boston, said she moved in with her daughter for several years in Duxbury before moving into an assisted-living facility there. She said she loved it there, but more recently her need for a greater level of care grew, so Lynch moved to Elizabeth Seton in Wellesley.

“It’s been an adjustment, but the staff is fantastic, knowledgeable and good,” she said, echoing what’s shown to be true in published ratings of the facility.

Nonetheless, state lawmakers have repeatedly balked at increasing reimbursement levels for nursing facilities. Roughly 10,000 people turn 65 years old each day in the United States, and will continue to do so for the next decade, meaning older adults are quickly becoming a larger segment of the total population. As they get older, demand for care will inevitably rise.

If the decline of nursing homes continues for too long, however, there’s no telling what the industry might look like at that point.

“It’s pretty bleak,” said Len Fishman, director of the Gerontology Institute at the University of Massachusetts Boston. “We want to provide alternatives that will leave people out of nursing homes unless it’s absolutely necessary. But for people who absolutely require nursing facility-level of care, they should be supported.”

At Elizabeth Seton, Ferrante is grappling with the fact that health care costs alone have risen 17 percent in the last three years while reimbursement rates have remained stagnant. Nonetheless, she’s bullish about the work, her employees and the care they provide.

““People work here because they believe in our mission. You have to have it in your heart to do this work,” Ferrante said. “Nursing homes have a critical role and they’re not going away.”

Eli Sherman is an investigative and in-depth reporter at Wicked Local and GateHouse Media. Email him at esherman@wickedlocal.com, or follow him on Twitter @Eli_Sherman.