Remember nursing homes? Someday, perhaps as soon as the next decade, that’s how Americans may start to think about them — in the past tense, as institutional relics.

The grim economic reality is that many nursing homes are facing extinction. In fact, I predict that the confluence of a number of trends — demographics, competition from nursing home alternatives, federal and state health-care policy and even technology — will mean as many as 20% of nursing home beds will be eliminated in the next five years.

Anyone with an aging parent, or really anyone who expects to grow old someday, would be smart to pay close attention to these trends. Not only does it provide insight into the level of care many of us can expect toward the end of life, it also shines a light on how current policy debates around health-care coverage may shape the future of old age in America.

Read: Here’s how Republicans and Democrats can come together to fix health care

Currently — and perhaps surprisingly — nursing homes, including those branded as skilled nursing facilities or rehabilitation centers, are facing underutilization. Occupancy rates have been steadily falling, save for a few quarterly spikes. The national utilization rate was about 86% in mid-2012; this year it is 81.8%.

Despite this drop, the number of skilled nursing facilities has been steady at about 15,000 for over 10 years, after a decades-long expansion. That’s likely to change.

How AI could make living in cities much less miserable

This dilemma is counterintuitive. After all, America is graying. The median-aged baby boomer will soon celebrate a 65th birthday; the oldest of them, born in 1946, is ambling into his or her 70s.

What industry ever lost money getting ahead of a demographic bulge?

Partly, it’s a demographic quirk at play. Nursing homes these days are populated mostly with residents in their 80s and older, those born, generally, in the 1920s and 1930s. So, maybe this is the calm before the storm, as the Depression-era recorded low birthrates, meaning the current cohort in nursing homes is unusually small, leaving beds unused.

We’re also living and staying healthy longer, and the traditional nursing home years may be delayed further than in the past.

But the biggest reason for empty beds in nursing homes? More alternatives exist nowadays. Assisted-living facilities and home health-care, by large margins, are the leading growth areas.

This shouldn’t be surprising. Nursing homes, symbolically and often in reality, represent life’s bleak last stop. People try to delay their nursing home arrival as long as possible.

Read more:It’s time to think about your doctor for next year

And older people with even middle-class means almost always choose less institutional settings than a nursing home, at least until their money runs out or care becomes impossible anywhere else. Then, a nursing home becomes the provider of last resort.

In fact, there is a lot of potential for old folks to delay their nursing home years even further, as technology is developed that might allow people to spend more years aging at home. How many children would be more comfortable with mom living alone in her later years if sensors in her home could report that she’s safe?

Perhaps the bigger looming threat to nursing homes is their dependence on state Medicaid programs, which are in danger of losing matching federal funds as Washington grapples with health care reform.

When people think of Medicaid, their first response frequently is to think of welfare recipients with no job. But about 20% of Medicaid spending is on long-term care, much of it nursing care for people who have outlived their assets.

Medicaid is the primary payer for long-term care, including $55 billion that went to nursing homes in 2015, covering six in 10 nursing home patients. The variety of proposals that would limit Medicaid financing would threaten this funding, and any facility depending on Medicaid would likely need to reduce staff, leading to declines in care quality, making it even harder for these facilities to compete with alternatives available to individuals who have private funds available.

Nursing homes that have the capital would be smart to improve their services and upgrade their facilities now, possibly even considering how to diversify (become high-intensity rehabilitation centers or lower-acuity assisted living facilities), to lure commercial and private payers rather than focus solely on Medicaid recipients who fill many of the beds today. This is a hard turn that many skilled nursing facilities don’t have the financial or operational wherewithal to make. And if they cannot make the turn now, they might not make it at all.

Medicare, the federal health plan for those over 65, will not save us from this eventuality, either. Medicare and even most private health insurance generally don’t cover long-term care or nursing homes. Could there be a big opportunity here for long-term care insurers to step in? Perhaps.

Few will mourn the demise of the nursing home, until faced with their own need. Let’s make sure that demand is met by facilities we can be proud of.

Betsy Rust, CPA, is a consulting partner with Plante Moran’s senior care and living practice in Southfield, Mich.