(Reuters) - Amazon.com Inc has agreed not to sell foie gras in California from birds that have been force fed and pay $100,000 in penalties and costs as part of a lawsuit settlement, a prosecutor said Friday.

The lawsuit filed by prosecutors in Los Angeles, Monterey and Santa Clara counties accused the world’s largest online retailer of violating a 2004 state law banning sales of the fatty duck and goose liver if it was produced by force-feeding poultry.

A judge approved the settlement on Thursday between Amazon and the three prosecutors, Los Angeles County District Attorney Jackie Lacey said in a statement.

Amazon declined comment.

To produce foie gras, ducks and geese are force-fed over a period of days by having metal pipes pushed down their throats so grain and fat can be pumped into their stomachs. Prosecutors said the process was cruel and painful.

Prosecutors contacted Amazon several years ago regarding their concerns and the company took step to stop foie gras sales. As the parties were in negotiations, the foie gras industry launched a lawsuit against California’s ban and a U.S. court blocked it in 2015.

A federal appeals court overturned that ruling in 2017 and said the state was free to enforce it. North American foie gras producers have now asked the U.S. Supreme Court to take up their case.