Maria Davila lay mute in a nursing home as her husband stroked her hand. Davila, 65, suffers from a long list of ailments — respiratory failure, kidney disease, high blood pressure, an irregular heartbeat — and is kept alive by a ventilator and a feeding tube.

Doctors recently added another diagnosis to her medical chart: Candida auris, a highly contagious, drug-resistant fungus that has infected nearly 800 people since it arrived in the United States four years ago, with half of patients dying within 90 days.

At least 38 other patients at Davila’s nursing home in Brooklyn, N.Y., have been infected with or carry C. auris, a germ so virulent and hard to eradicate that some facilities will not accept patients with it. As they struggle to contain the pathogen, public health officials — local, state and federal — say that skilled nursing facilities are fueling its spread.

“They are the dark underbelly of drug-resistant infection,” said Dr. Tom Chiller of the Centers for Disease Control and Prevention.

Much of the blame for the rise of drug-resistant infections has focused on the overuse of antibiotics and on hospital-acquired infections. But public health experts say that nursing facilities, and long-term hospitals, are a dangerously weak link in the health care system, often understaffed and ill-equipped to enforce rigorous infection control, yet cycling infected patients, or carriers, into hospitals and back again.

“They are cauldrons that are constantly seeding and reseeding hospitals with increasingly dangerous bacteria,” said Betsy McCaughey, who leads the Committee to Reduce Infection Deaths. “You’ll never protect hospital patients until the nursing homes are forced to clean up.”

Meanwhile, skilled nursing homes and long-term care facilities have been playing an increasingly important role in caring for seriously ill patients who used to stay longer in hospitals. There are now about 400 long-term care hospitals across the country, up from about 40 in the early 1980s, economist Neale Mahoney said.

Drug-resistant germs of all types thrive in such settings where severely ill and ventilated patients are prone to infection and often take multiple antibiotics, which can spur drug resistance. Resistant germs can then move from bed to bed, or from patient to family or staff, and then to hospitals and the public.

The phenomenon is global. A 2017 study found that elderly residents of long-term care facilities in Britain were four times as likely to be infected with drug-resistant urinary tract infections as peers living at home. Soaring levels of resistance were found in long-term care facilities in Italy, a 2018 paper said. A 2019 study found that long-term care facilities in Israel are “a major reservoir” of carbapenem-resistant Enterobacteriaceae, or CRE — a major family of drug-resistant germs — contributing to their “rapid regional dissemination.”

Experts said the problem is pronounced in the United States, given changing economics that push high-risk patients out of hospitals and into skilled nursing homes. The facilities are reimbursed at a higher rate to care for these patients, they said, providing an economic incentive for poorly staffed or equipped facilities to care for vulnerable patients.

Davila, who has taken at least a dozen trips to the hospital from the nursing home, spends her days frozen in bed, serenaded by a Latin music and the whir of her respirator. Hernandez doubts she will recover. “If I can take her home to die that would be a blessing,” he said.

He pulled the blanket higher and told his wife he loved her. Momentarily alert, she fixed her eyes on his and then mouthed: “I love you, too.”