SAN FRANCISCO — A federal appeals court Friday upheld a California law that bans the sale of foie gras made by the force-feeding of ducks and geese.

A three-judge panel of the 9th U.S. Circuit Court of Appeals, overturning a district judge’s injunction against the law, said California is free to enforce it.

The Legislature passed the law in 2004 after finding that forced feeding was cruel and inhumane.

Producing foie gras, a pricey delicacy made of the birds’ liver, typically involves placing a 10- to 12-inch metal or plastic tube into the bird’s esophagus to deliver large amounts of concentrated food.

The law gave producers a grace period of more than seven years to find a new method of making foie gras.

Producers and a restaurant that serves foie gras filed suit to overturn the ban on sales. A district judge ruled that the state ban illegally interfered with federal law.

Because federal law “contemplates extensive state involvement, Congress clearly did not intend to occupy the field of poultry products,” the 9th Circuit said.

Marcus Henley, the manager at Hudson Valley Foie Gras in New York, said in an email to the Los Angeles Times, “We will appeal. This process may take months. Until this appeal is completed, the law and the ban are not implemented and foie gras is legal to sell and serve in California.”

A decision by the 9th Circuit on whether to review the ruling could take weeks, or even months. The full court could refuse to review the ruling, which would then allow the ban to take effect.

Two-star Michelin chef Josiah Citrin, owner of the fine-dining French restaurant Melisse in Santa Monica and Charcoal in Venice, was surprised to hear about the ban again.

Get news headlines sent daily to your inbox

“It’s kind of shocking,” said Citrin, who has a foie gras torchon on his current tasting menu at Melisse. “I don’t think anyone was expecting this right now. ... I enjoy eating foie gras, but it’s not going to end what I do. I just don’t like being told what we can and can’t use.”

“I think, as chefs, we try to be pretty good to nature and everything around us in general,” said Citrin. “We have enough political issues right now in this world that are much more important.”

Ingrid Newkirk, president of People for the Ethical Treatment of Animals, said in a statement that “the Champagne corks are popping.”

“PETA has protested against this practice for years, showing videos of geese being force-fed that no one but the most callous chefs could stomach and revealing that foie gras is torture on toast and unimaginably cruel,” Newkirk said.