As California hospitals brace for a surge of patients sickened by the new coronavirus, they must confront one of their biggest challenges: stopping the spread of the virus within their own walls. If history is any guide, however, it will not be easy.

In recent years, even some of the state’s best hospitals have faced difficulties curbing infections in their facilities.

In the Bay Area, UCSF Medical Center, Stanford Health Care, and CPMC Pacific Campus performed below the national or state average in preventing certain health care-associated infections each year from 2015 to 2018, according to a report by the California Department of Public Health released in November.

Although infection control at hospitals overall has been improving, those same facilities, along with dozens of other hospitals in the state, lost federal money this year due to a high number of patient infections or injuries between 2016 and 2018, according to federal data compiled by Kaiser Health News.

Now as nurses across California have been protesting a critical lack of protective gear and what they consider inadequate safety measures at their hospitals, health care experts told The Chronicle that these struggles should serve as an urgent warning to local and state officials: without stringent infection control measures, the novel coronavirus could spread fast between patients and health care workers.

“All bets are off right now,” said Dian Baker, a professor at Sacramento State University’s School of Nursing and a hospital consultant on infection control. “Hospitals had a challenge in the best of times stopping the transmission of infections within their facilities. Now they don’t even have the equipment they need.”

Representatives for UCSF, Stanford and CPMC defended their infection-control methods, saying they immediately responded to prior weaknesses, have improved their practices and are readying their facilities to combat the coronavirus.

As of 2019, CPMC Pacific Campus was performing above the state average in preventing an infection commonly associated with organ transplants that had been more prevalent in previous years, according to data provided by the hospital.

Hospitals around the country, however, have been running low on even the most basic protective gear, including masks, gloves and gowns and other equipment needed to safely treat coronavirus patients. Many frontline medical personnel have also complained of difficulties getting tested — even if they have symptoms of COVID-19, the dangerous respiratory disease that the virus causes.

Doctors and nurses said they have had to reuse face masks, share goggles and, as of late last week, were expecting to run out of fresh gloves in some places.

The gear is vital to stopping the spread of the virus, which can be transmitted in microdroplets from the nose and lungs and remain on surfaces for days. Recent research also has shown it is present in fecal matter, which if still contagious, would make the virus “incredibly more challenging to contain,” said Dr. David A. Johnson, chief of gastroenterology at Eastern Virginia School of Medicine in Norfolk.

“This may be an unrecognized risk and unmet need for improvement” in hospitals, Johnson said.

Many are now looking to Europe, where the virus has ravaged unprepared hospitals and infected thousands of health care workers. Last week, Spain reported that 14% of the country’s confirmed cases, or about 5,400, were medical professionals. In the United States, hundreds of health care workers have been sickened with COVID-19, raising the possibility that the virus is spreading between workers and patients.

At least 73 California health care workers have been confirmed to have the virus. Last week San Francisco also saw a string of its own positive cases among people in health care settings, including an emergency room worker at San Francisco General Hospital and five nurses, two porters and two residents at Laguna Honda Hospital, a massive, city-run nursing home.

City officials said Friday that they expected the situation at Laguna Honda to become an outbreak as the hospital expands testing to more staffers and residents and announced plans to prioritize testing for health care workers and first responders.

Meanwhile the state’s tally of positive cases continued to tick higher with 5,786 confirmed cases of coronavirus and 123 deaths as of Sunday afternoon. Over the weekend, the cases of serious coronavirus infections also surged with a 105% increase in patients admitted to intensive care units from Friday to Saturday.

“Nurses are angry because they know the protections they need,” said Deborah Burger, president of National Nurses United and a nurse at Kaiser Permanente’s Santa Rosa Hospital. “You don’t want the hospital to become the vector for this disease.”

That possibility became a grim reality during the SARS epidemic of 2003, particularly in Toronto, where many exposed health care workers, patients and visitors spread the infection to each other. In the end, 72% of the cases in Toronto originated in health care facilities.

“It was a bit like being in a war where you are trying to battle an unseen enemy and meanwhile you are literally losing the troops,” said Dr. David White, a Toronto family physician who works at a hospital that was significantly impacted.

White said early mistakes helped spread the disease, including not realizing that patients with more minor symptoms might have SARS and staff having to quickly learn complex procedures related to putting on and taking off protective equipment.

High-stress situations that require health care workers to rush between patients also can lead to more slip-ups that may aid the spread of disease. For instance, White said, he and one of his residents were recently putting on protective gear before treating a patient who had traveled overseas and was suspected of having COVID-19 when White noticed that his resident’s glove had ripped and that he hadn’t cleaned his stethoscope.

Health care facilities in the Bay Area are girding for an onslaught of coronavirus patients, canceling elective procedures and routine medical appointments and setting up triage tents and drive-through clinics to keep potentially infectious patients out of urgent-care centers and emergency rooms. Some are setting up additional rooms for patients who may need to be quarantined and treated with IVs or oxygen.

Basic infection-control measures also are widespread, including strict policies on washing hands and sanitizing equipment. Health care experts told The Chronicle that the heightened awareness caused by the pandemic could lead to greater compliance.

But the 2019 report by the California Department of Public Health shows just how difficult it can be to stymie infections in health care facilities, even when hospitals are fully staffed and properly outfitted with safety equipment.

Across the country, health care-associated infections are a leading cause of death, often caused by bacteria that can spread through a patient’s lungs, gastrointestinal tract or blood.

Although all four health care-associated infections examined in the state report dropped between 2015 and 2018 - including one that fell by 41% - the problem remained pronounced in some hospitals.

Long-term acute-care facilities, which serve patients with complex medical needs for a prolonged period, made little progress in reducing infections, the report found. UCSF, Stanford and CPMC Pacific were among seven California acute-care hospitals that performed below the national or state average in preventing certain infections each year in that time period.

Experts cautioned that large teaching hospitals can have relatively high infection rates since they deal with patients who have more serious medical conditions. In some cases — such as with Stanford — the hospitals performed above the national or state average in preventing several of the infection types, but struggled to rein in specific problems.

“The more compromised you are, the more high risk you are, the more likely you’ll be subject to a health care-associated infection,” said Dr. John Swartzberg, a UC Berkeley infectious disease expert. “Those hospitals on the list are arguably the top university teaching hospitals in the country.”

Dr. Sean Townsend, vice president of quality and safety at CPMC, said the higher infection rates in past years stemmed from multidrug-resistant bacteria that are more common in hospitals with transplant programs due to patients’ increased exposure to antibiotics — a different challenge than what a respiratory illness like the coronavirus presents.

To keep the coronavirus from spreading, the CPMC facilities in San Francisco have followed the lead of places like Singapore and Hong Kong by separating suspected and confirmed COVID-19 patients and equipping staff who take care of them with N95 masks — a measure that goes beyond Centers for Disease Control and Prevention guidance.

Now Playing:

Several procedures have been put in place since 2018 that have reduced health care-acquired infections, including a handwashing campaign that raised compliance to 90% — the national average is less than 50% — and sanitizing hospital rooms with ultraviolet lights between each use.

“Once you have health care-acquired infections in your facility, changing patterns of behavior, changing culture and changing awareness of staff to get that under control is not something you do overnight,” Townsend said.

In the period of time examined by the state health department, UCSF Medical Center struggled to prevent a type of bacterial infection that causes life-threatening diarrhea and is often associated with “lapses in infection control care practices,” according to the report.

But UCSF Medical Center spokeswoman Elizabeth Fernandez said the facility has had no hospital-acquired coronavirus infections and is no longer experiencing immediate shortages in protective equipment because of donations they have received.

Fernandez also said the facility’s recent infection control citations involved sterilization protocols for certain surgical equipment that were immediately remedied and are unrelated to care for COVID-19 patients.

The hospital has been preparing for coronavirus patients since mid-January, Fernandez said, including giving masks to every patient who enters the hospital with a respiratory illness and providing training to all employees who care for coronavirus patients.

Stanford Health Care faced challenges combating the same type of antibiotic-resistant bacteria that posed problems for CPMC, according to the state report. Stanford Health Care spokeswoman Julie Greicius said the hospital has since improved its performance and in the past six months has been recognized by national safety and quality groups, including earning a Safety Grade “A” from the Leapfrog Group, a patient safety organization.

Baker, the Sacramento nursing professor, said patients or their families can also take steps to protect themselves from infection, either by the coronavirus or other pathogens, should they end up in a hospital.

Baker recommended sanitizing bedside trays and handrails, having the patient wash or sanitize their hands and brush their teeth regularly, if possible, and insisting that medical personnel wash or sanitize their hands before beginning any treatment.

“This is more important now than ever,” Baker said.

Cynthia Dizikes and Joaquin Palomino are San Francisco Chronicle staff writers. Email: cdizikes@sfchronicle.com, jpalomino@sfchronicle.com Twitter: @JoaquinPaolomino, @cdizikes