The U.S. Supreme Court has rejected two major farm groups’ challenge of a California law requiring breeding pigs have more space in livestock confinements.

The American Farm Bureau and the Iowa-based National Pork Producers Council argued it will cost the swine industry up to $360 million to abide by the California requirement and reconfigure the pens for sows. The groups also contend the 2018 California ballot initiative opens the door to having other states pass regulations that affect farm operations outside their borders.

Trish Cook, a pig farmer from Winthrop who’s president of the Iowa Pork Producers Association, said some small and medium-sized producers will go out of business and consumers will pay higher prices for pork because of the Supreme Court’s decision.

“To say it’s disappointing is a large understatement,” Cook said.

Cook suggests upholding Proposition 12 — the voter approved California animal welfare standards — may lead to an escalation of farming regulations. “The ruling sets a really bad precedent because it does enable states to regulate commerce outside their boundaries,” Cook said.

U.S. Supreme Court Justice Neil Gorsuch wrote that companies must normally comply with the laws in states where their products are sold. Iowa Senator Joni Ernst, in a tweet, said the court is letting extremists in California effectively ban bacon that comes from Iowa hogs. Iowa Senator Chuck Grassley also tweeted after the ruling was issued, saying you can expect to pay more for bacon, since California’s the largest consumer market and pork producers nationwide will have to respond to these regulations.

In a written statement, Iowa Ag Secretary Mike Naig said the court’s decision will allow large states to start dictating how other industries and businesses in the rest of America operate.