A state lawmaker is moving to close a bizarre regulatory loophole that prohibits residents from holding potlucks in their own home or church.

Arizona state Rep. Kelly Townsend, R-Mesa, called the ban a “legislative oversight” and is championing a bill to refine the statute’s language to legalize potlucks across the state.

The law initially was written to subject all served food to safety regulations and health department inspections. However, lawmakers explicitly exempted potlucks and other “noncommercial social events” if they occur at a workplace.

Since the exemption did not include potlucks held in homes or churches, the law effectively made them illegal in Arizona. Anyone caught hosting a potluck outside the workplace could be slapped with a fine or even arrested.

Paul Avelar, a senior attorney at the Institute for Justice’s Arizona office, called the law “insane.”

In an interview with The Daily Signal, Avelar said he stumbled upon Townsend’s bill while sifting through bills introduced in the state this year. That’s when he first learned that Arizona—“I guess accidentally”—had made potlucks illegal. He said:

I think what happened is what happens very often with regulations. More frequently the government is demanding the seats at our dining room table by telling us what we can have on our plates, in our glasses, where it comes from, and how it would have to get there.

The issue made local headlines after authorities in Pinal County, Ariz., shut down a potluck party hosted in a mobile home park after a resident who knew about the law decided to complain.

One resident brought the law to Townsend’s attention, moving her to introduce a bill last month to clarify the statute. She told a local paper she didn’t believe the law was intended to shut down all potlucks.

“These are the sorts of common, everyday things that Americans don’t need to have regulated for them,” Avelar said. “We are all more than smart enough to be able to figure out what we can eat and when we can eat it.”

John Seibler, a visiting legal fellow at The Heritage Foundation, told The Daily Signal that regulations like this are “not at all unique.” In fact, he said, they exist in every state and “in masses” at the federal level.

In Wisconsin, for example, it is illegal to sell home-baked goods. Residents who decide to sell homemade cookies or muffins could face a $1,000 fine or six months in jail.

In Florida, Avelar said, owners of a small creamery who pasteurize and separate raw milk to produce skim milk can sell it legally but must call it “milk product.”

The laws governing what people may eat and drink, he said, often are motivated by the “twin evils of protectionism and paternalism.”

“Meaning the government is acting to protect certain business interests from everyday competition or just because the government thinks it knows better than what people can and should eat,” he said.

The Institute for Justice is pursuing lawsuits against Wisconsin and Florida laws, along with a range of others across the United States, as part of an effort called the National Food Freedom Initiative.

In the United States, Seibler noted, over 300,000 regulations carry criminal penalties on the federal level alone.

Seibler said this creates a “notice problem” because individuals usually aren’t aware of every single law that applies to them:

Everyone should know what the law says so they have the opportunity to conform their conduct to the law; otherwise, when these regulations deviate so far from common morality, you’re simply setting up traps to imprison people.