LOS ANGELES (AP) — A federal judge has ruled that California residents can again legally buy foie gras, provided the product and transaction are made out of state, but they still can’t get the delicacy in restaurants.

California’s ban on foie gras, the fattened liver of a duck or goose, was challenged in court by out-of-state producers who said they lost nearly one-third of their sales after the prohibition took effect.

U.S. District Judge Stephen V. Wilson ruled Tuesday the sale of foie gras doesn’t violate the law if the seller is outside of California and the product is given to a third-party delivery service and brought into the state.

“There is no principled way to distinguish between foie gras purchased out of state and transported into California by the purchaser and that which is delivered by a third party,” the judge wrote.

The ruling only applies to people who buy foie gras for individual consumption. Restaurants and retailers are still prohibited from selling it or giving it away for free, said Kelsey Eberly, an attorney with the Animal Legal Defense Fund.

“Nothing has really changed. Selling foie gras is still illegal. Nobody can sell it, restaurants can’t serve it,” Eberly said Thursday.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.