Safety violations at a major compounding pharmacy are exacerbating hospital shortages of key painkillers, particularly in California where health officials have taken the “extraordinary” step of prohibiting sales from one of its plants.

In late March, California’s Board of Pharmacy barred the distribution of medications — including lidocaine and other local anesthetics — from a Texas factory belonging to the company, PharMEDium. The decision came after the pharmacy board had issued a cease-and-desist order against the plant in February, citing “an immediate threat to the public health or safety.”

In December, the Food and Drug Administration issued a damning inspection report on PharMEDium’s Tennessee plant that led the company to voluntarily cease production there.

There are two kinds of compounding pharmacies: ones that mix custom prescriptions for individual patients, from chemotherapy cocktails to thyroid drugs, and those like PharMEDium, which mass-produce ready-to-use IV bags, prefilled syringes and other sterile medical solutions for hospitals, surgery centers and other health care facilities.

PharMEDium, one of the nation’s largest compounding pharmacy companies, is owned by AmerisourceBergen and supplies medications to about 77 percent of hospitals nationwide.

Before the crackdown on PharMEDium, hospitals already were facing critical shortages of the injectable opioid painkillers Dilaudid, morphine and fentanyl, which started with manufacturing delays at pharmaceutical giant Pfizer. The shutdown at PharMEDium’s Tennessee plant, which makes those drugs, has intensified the shortage nationally.

Doctors, determined to spare their patients pain, consequently have turned to second-choice pain drugs and increased their use of local anesthetics such as lidocaine. But now, even those local anesthetics — lidocaine, ropivacaine and bupivacaine — are in short supply due to manufacturing problems and back orders, according to doctors and federal regulators.

Shortages of both types of painkillers have hit California health care providers especially hard. They must contend with the state crackdown on PharMEDium’s Texas plant, which produces local anesthetics, and federal scrutiny of the Tennessee plant, which produces the injectable opioids. Some California hospitals have abandoned the company altogether.

“We’re having to be very creative,” said Dr. Aimee Moulin, an emergency doctor at the University of California-Davis Health System who is president of the California chapter of the American College of Emergency Physicians.

“There are times when we’re not able to achieve that amount of anesthesia that we would like,” Moulin said. When that happens, she often turns to a second-choice drug that might not be as effective.

Dr. Rita Agarwal, who practices at Stanford University’s Lucile Packard Children’s Hospital, said the facility has a sufficient supply of local anesthetics to cope with the injectable opioid shortages. But if that changes, doctors may have to cancel elective surgeries, she said.

“If we can’t provide patients with adequate pain relief, then it’s sort of barbaric to do the surgery,” said Agarwal, who is also a professor of anesthesiology at Stanford.

In the meantime, her team is using more drugs like Demerol or remifentanil, which are not ideal in many cases because they have side effects or are short-acting.

“It’s unbelievably frustrating,” Agarwal said. “The solutions are [being] snatched away from us.”

California’s concern about PharMEDium dates to at least 2016, when the state warned the company about drugs “lacking in quality or strength” and fined it for failing to notify state officials about a product recall, according to public records obtained by California Healthline.

Then, the California Board of Pharmacy’s temporary cease-and-desist order, issued Feb. 27, faulted PharMEDium’s Sugar Land, Texas, plant for 14 violations, including flawed expiration dating and improper labeling. Virginia Herold, the board’s executive officer, called the action an “extraordinary authority” that it doesn’t use frequently.

In late March, the board decided not to renew the plant’s license. The agency is not aware of any patient harm that may be related to the plant’s failures, Herold said.

PharMEDium spokeswoman Lauren Esposito said the company is committed to resolving the matter.

“We look forward to renewing our California licenses and resuming shipment of our products into the state of California as soon as the board feels that its observations have been satisfactorily addressed,” she said.

California’s crackdown could make waves economically and symbolically, because of the size of its market and the message it sends to other states, said Dave Thomas, a principal with LDT Health Solutions, a consulting firm for compounding pharmacies.

“This can get pretty hairy for PharMEDium pretty fast,” he said.

At the federal level, the FDA’s December report on PharMEDium’s Memphis, Tenn., plant listed a litany of deficiencies.

The report said the plant, which supplies injectable opioids to hospitals around the country, wasn’t doing enough to ensure medications were sterile before shipping them.

The FDA also reprimanded the company for poor employee training and failure to report and thoroughly investigate a case in which a patient became unconscious after receiving an injection of morphine produced by PharMEDium.

In the industry’s defense, said Thomas, the consultant, FDA inspectors can be inconsistent and deficiencies cited at compounding plants can depend on the person writing the report.

Government officials have stepped up scrutiny of compounding pharmacies since 2012, when contaminated drugs from the New England Compounding Center led to a national meningitis outbreak that killed 64 people and sickened 793 patients. The incident led to an eight-year prison sentence for the compounder’s supervising pharmacist, and a 2013 federal law that created new requirements for the pharmacies.

PharMEDium doesn’t know when the Memphis plant will start production again, Esposito said.

“We are actively working to address the items noted by FDA during the inspection and will resume … activities when we have determined our own readiness,” she said.

Because the Memphis plant is still offline, shortages of injectable opioids have worsened, according to a large California medical system.

“It’s been a struggle” to maintain an adequate stock of the medications since the plant stopped producing, said Donald Kaplan, a pharmacy director at Kaiser Permanente in Southern California. (California Healthline is produced by Kaiser Health News, which is not affiliated with Kaiser Permanente.)

Opioid supplies have dwindled so dramatically that Kaiser is shipping medications from one hospital to others that are in short supply, sometimes multiple times per week, he said.

In recent years, some hospitals have sought alternatives to PharMEDium because of quality problems, according to the California Hospital Association.

That’s the case with Mayers Memorial Hospital District in Shasta County, whose chief clinical officer Keith Earnest said it hasn’t used PharMEDium’s products in five years.

“I am glad they are finally no longer allowed to ship to California,” he said. “It has been a long time coming.”