If you sell baked goods in Wisconsin that were made in a home kitchen, you could go to prison. That is why a nonprofit has filed a lawsuit on the behalf of three farmers who feel the law is unconstitutional.

Homemade pickles, salsa, jams and jellies can be sold to consumers at farmers' markets and other venues without a license in the state. But, muffins, bread and other baked goods like cookies need to be made in a commercial kitchen, which is subject to inspections and fees.

If you do sell such goods, you may face a fine of up to $1,000 or six months in jail.

The Institute for Justice has filed the lawsuit on behalf of Lisa Kivirist of Browntown, Kriss Marion of Blanchardville and Dela Ends of Brodhead. The organization said "the ban cannot be justified."

"Wisconsin’s home-baked-good ban has nothing to do with safety and everything to do with politics and protectionism. Commercial food groups, like the Wisconsin Bakers Association, have lobbied to keep the ban in place in order to protect themselves from honest competition," said Erica Smith, the lead attorney on the Wisconsin baked goods case.

Smith said outfitting a commercial kitchen can cost approximately $40,000 to $80,000. She added that renting space in an existing commercial kitchen can cost more than $1,000 a month.

Dave Schmidt, executive director of the Wisconsin Bakers Association, said he wouldn't be opposed to citizens in Wisconsin selling baked goods so long as they were following the same procedures as stores that sell goods.

"No I wouldn't be opposed to it at all as long as they were still operating under the same regulations as brick-and-mortar stores, but if they weren't then yes," Schmidt said.

A proposal to allow the sale of baked goods without a license has failed to pass in the Legislature in previous years. One such bill that would limit earnings to less than $7,500 a year passed in the state's Senate on Tuesday. However, SB 330 also known as the "Cookie Bill," still has to make it through the Assembly.

The Wisconsin attorney general's office, which represents the state in court, told NBC Chicago Wednesday they are still reviewing the complaint.