At the 390-bed Terrace View nursing home on the east side of Buffalo, 22 beds were shut down late last month. There wasn’t enough staff to care for a full house, safely or legally.

That meant that some fully recovered patients in the adjacent Erie County Medical Center had to stay in their hospital rooms, waiting for a bed in the nursing home. Which meant that some patients in the emergency department, who should have been admitted to the hospital, remained there until a hospital bed opened up. The emergency department became stretched so thin that 10 percent to 20 percent of arrivals left without seeing a caregiver — after an average wait of six hours to eight hours, according to the hospital’s data.

“We used to get upset when our ‘left without being seen’ went above 3 percent,” said Thomas Quatroche, president and chief executive of the Erie County Medical Center Corp., which runs the 590-bed safety net hospital.

Nursing home bed and staff shortages were problems in the United States before the coronavirus pandemic. But the departure of 420,000 employees over the past two years has narrowed the bottleneck at nursing homes and other long-term care facilities at the same time that acute care hospitals are facing unending demand for services due to a persistent pandemic and staff shortages of their own.

With the omicron variant of the coronavirus causing even more hospitalizations, the problems nursing homes face are taking on even more importance. Several states have sent National Guard members to help with caregiving and other chores.

Hospitalizations, which peaked at more than 142,000 in January 2021, are rising again as well, reaching more than 126,000 nationally on Thursday, according to data tracked by The Washington Post. In some places, there is little room left in hospitals or ICUs.

About 58 percent of the nation’s 14,000 nursing homes are limiting admissions, according to a voluntary survey conducted by the American Health Care Association, which represents them. According to the U.S. Bureau of Labor Statistics, about 420,000 employees, many of them low-paid certified nursing assistants — the backbone of the nursing home workforce, have left since February 2020.

“What we’re seeing on the hospital side is a reflection of that,” said Rob Shipp, vice president for population health and clinical affairs at the Hospital and Healthsystem Association of Pennsylvania, which represents medical providers in that state. The backups are not just for traditional medical inpatients ready for follow-up care, he said, but psychiatric and other patients as well.

A handful of developmentally disabled patients at Erie County Medical Center waited as long as a year for placement in a group setting, Quatroche said. Medical patients recovered from illness and surgery who cannot go home safely may wait days or weeks for a bed, he said.

“I don’t know if everyone understands how serious the situation is,” Quatroche said. “You really don’t know until you need care. And then you know immediately.”

Remarkably, despite the horrific incidents of death and illness in nursing homes at the outset of the pandemic, more staff departures have come during the economic recovery. As restaurants and shops reopened and hiring set records, nursing homes continued to bleed workers, even as residents returned.

Nearly 234,000 workers left during the recovery, data through November show. No other industry suffered anything close to those losses over the same period, according to the Bureau of Labor Statistics.

Workers in the broader health-care industry have been quitting in record numbers for most of the pandemic, plagued by burnout, vulnerability to the coronavirus and poaching by competitors. Low-wage workers tend to quit at the highest rates, Labor Department data show, and nursing home workers are the lowest paid in the health sector, with nonmanagerial earnings averaging between $17.45 an hour for assisted living to $21.19 an hour for skilled nursing facilities, according to the BLS.

Nursing home occupancy fell sharply when the United States saw its first cases of the coronavirus, but it inched back upward in 2021, according to the nonprofit National Investment Center for Seniors Housing & Care. One major force that held it back was worker shortages.

“Operators in the business have said we could admit more patients, but we cannot find the staff to allow that to happen,” said Bill Kauffman, senior principal at the organization.

Shortages have spawned fierce talent wars in the industry, Brookdale Senior Living Chief Executive Cindy Baier said in a recent earnings call. When they don’t have enough workers, restaurants can reduce service hours and hospitals can cut elective surgeries, but nursing homes don’t have the option of eliminating critical services, she said. They must close beds.

“We are in the ‘people taking care of people’ business around-the-clock, 365 days a year,” she said.

Nursing homes tend to gain workers during a recession but can struggle to hire during expansions, according to an analysis of county-level data from the Great Recession recently published in the health care provision and financing journal Inquiry.

Steady income from their resident population and government programs such as Medicaid makes nursing homes recession-proof, and their low pay and challenging work conditions mean they’re chronically understaffed, said one of the study’s authors, Indiana University health-care economist Kosali Simon.

When recessions occur, nursing homes go on a hiring spree, filling holes in their staff with qualified workers laid off elsewhere.

“People during a recession may lose their construction jobs or jobs in retail sectors, and then look for entry-level positions at places like nursing homes where there is always demand,” Simon said.

Now, amid the “Great Resignation” and the hot job market, the opposite is happening. In sparsely populated areas and regions where pay is lower, the problem is even worse.

The Diakonos Group, which operates 26 nursing homes, assisted-living facilities and group homes in Oklahoma, closed an 84-bed location for seniors with mental health needs in May “simply because we couldn’t staff it any longer,” said Chief Executive Scott Pilgrim. Patients were transferred elsewhere, including Tulsa and Oklahoma City, he said.

The home in rural Medford, which depended entirely on Medicaid payments, “was never easy to staff, but once we started through covid and everything, our staff was just burned out.”

Diakonos boosted certified nursing assistants’ pay from $12 an hour and licensed practical nurses’ pay from $20 an hour, used federal and state assistance to offer bonuses and employed overtime, but workers kept leaving for better health-care jobs and positions in other industries, he said.

“I’ve never been able to pay what we ought to pay,” Pilgrim said. Eventually he began to limit admissions and eventually was forced to close the facility.

“The hospitals are backed up,” he said. “They’re trying to find anywhere to send people. We get referrals from states all around us. The hospitals are desperate to find places to send people.”

In Pennsylvania, SpiriTrust Lutheran was not filling 61 of its 344 beds in six facilities last month because of the worker shortage, said Carol Hess, the company’s senior vice president.

“I have nurses who went to become real estate agents,” she said. “They were just burned out.”

Pay raises of $1 to $1.50 an hour and bonuses brought the lowest-paid workers to about $15 an hour, Hess said, and the company is planning a recruiting drive. But the prognosis is still grim.

“We’re competing with restaurants for our dining team members,” Hess said. “We’re competing with other folks for cleaning and laundry and others.” In the area around Harrisburg, where SpiriTrust employees live, some schools that turned out certified nurse assistants closed during the pandemic and haven’t reopened.

The nursing homes have begun borrowing licensed practical nurses from WellSpan Health, the nearby hospital system that discharges many of its patients to SpiriTrust after they recover. About 15 began their orientations last month, she said, and the two systems are collaborating to pay them.

The bed shortage is causing backups that can average several days in the hospital, said Michael Seim, the hospital system’s chief quality officer. That gives the hospitals an interest in helping any way they can, he said.

“We have between 80 and 100 patients waiting for some type of skilled care,” Seim said. The hospital has begun caring for more people at home, enrolling 400 people so far in a program that sends clinicians to check on them there. More than 90 percent have said they are happy with the program.

“I think the future of hospital-based care is partnerships,” Seim said. “It’s going to be health systems partnering across their service areas … to disrupt the model we have.”