SAN FRANCISCO — A sharply divided California Supreme Court ruled Thursday that pharmaceutical companies can be held liable for warning labels on generic versions of drugs they once made even after they’ve sold the drugs to other companies and stopped manufacturing them.

The 4-3 decision was a victory for consumer advocates, but the pharmaceutical industry had argued that such a finding would stifle innovation and lead to extraneous warnings on drugs that could deter people from using them.

In a dissenting opinion, Associate Justice Carol Corrigan said the ruling was at odds with courts across the U.S. that have refused to hold a previous manufacturer responsible for failing to warn about injuries caused by a successive company’s product.

“When a drug manufacturer acquires a new product line, it assumes the responsibility to update the warning label if and when reasonable evidence demonstrates a link to a serious health hazard,” she wrote. “Predecessor manufacturers have a right to presume successors will perform their duty and follow the law.”

The ruling came in a lawsuit against drug company Novartis by the children of a woman who while pregnant in 2007 was prescribed a generic version of the drug terbutaline — an asthma medication that Novartis once sold under the brand name Brethine. The drug was used to stop the mother’s premature labor, but the children claim it caused them to suffer brain injuries.

They accuse Novartis of failing to warn their mother about those dangers though it knew or should have known about them.

The U.S. Food and Drug Administration warned in 2011 that injectable terbutaline should not be given to pregnant women to prevent preterm labor or treat it for a prolonged period. The lawsuit against Novartis claims studies going as far back as the 1970s raised concerns about using terbutaline on pregnant women.

Novartis argued it had sold its rights to Brethine in 2001 and had no additional responsibility for the warning label on generic versions of the drug at the time terbutaline was administered to the mother.

Novartis said in a statement it is reviewing the opinion and “will continue to defend against the plaintiffs’ unfounded claims.”

Brand-name drugmakers under federal regulations are responsible for the accuracy and adequacy of a drug’s warning label, according to Thursday’s ruling. Generic manufacturers are only required to make sure their warning label is the same as that of the brand-name drug.

In this case, Novartis had sold the brand-name drug to another company. Still, federal rules required the new manufacturer to use Novartis’ warning label unless directed otherwise by the FDA, according to the state Supreme Court ruling.

Associate Justice Mariano-Florentino Cuellar, writing for the majority, said those rules made it “forseeable” that the new manufacturer would not update the warning label when the first company failed to do so.

“In such circumstances, it is at least plausible that a successor manufacturer may choose to undertake only a cursory investigation of the medical literature, on the assumption that the prior manufacturer must have done a more thorough inquiry during the period that it was responsible for maintaining the warning label,” he wrote.

The court did not rule on the merits of the lawsuit against Novartis, but its ruling kept the case alive.