In this July 18, 2019, file photo, Moulard ducks, a hybrid white farm Peking duck and a South American Muscovy duck, are caged and force-fed at Hudson Valley Foie Gras duck farm in Ferndale, N.Y., to fatten their livers to produce foie gras.

New York City lawmakers have passed a bill that bans restaurants and grocery stores from selling foie gras, the fattened liver of a duck or goose.

The bill, which is expected to be signed by Mayor Bill de Blasio, would ban the sale of the delicacy starting in 2022. Animal welfare activists had campaigned for a ban on the grounds that the methods used to produce foie gras are cruel.

Usually, it involves force-feeding a bird through a tube briefly slipped down its throat.

Farmers who produce foie gras say the birds are treated humanely and don't suffer during the fattening process.

The final version of the bill called for violators of the ban to pay a fine of up to $2,000.

California banned the sale of foie gras in 2012. The state's ban was challenged in federal court, but an appeals court eventually upheld the ban. Chicago banned foie gras in 2006, but the ordinance was repealed two years later.

The ban could mean trouble for two farms outside the city that are premier U.S. producers of foie gras, with New York as their prime market. The farms employ about 400 mostly immigrant workers whose jobs could be in jeopardy due to the loss of city business.

Hudson Valley Foie Gras and the La Belle Farm collectively raise about 350,000 birds for foie gras a year.