DARLINGTON, Wis. -- A Wisconsin judge has overturned a ban on selling homemade baked goods in the state.

LaFayette County Judge Duane Jorgenson ruled Wednesday afternoon in favor of three women who'd challenged a state law they say made it impossible for home bakers to legally sell their treats.

Jorgenson said in his oral ruling the ban primarily serves business interests.

Get Breaking News Delivered to Your Inbox

The Institute for Justice, a libertarian law firm, argued the women's case. Department of Justice spokesman Johnny Koremenos says the state is considering an appeal.

The law in question required bakers to obtain a license, which requires using a commercial kitchen, submitting to inspections and paying fees.

"He put a lot of thought to our issue, and the fact that we have been hitting barriers for a long time trying to bake out of our home kitchens, it's a victory for those of us in kitchens throughout Wisconsin," said one of the women who challenged the case, Lisa Kivirist said.

Wisconsin already allows the sale of other homemade foods, including maple syrup, jams, pickles and other canned goods, as well as raw apple cider, CBS affiliate WISC reports.

Wisconsin and New Jersey are the only states that ban people from selling items baked at home.

Department of Justice spokesman Johnny Koremenos said the state is considering an appeal, according to WISC.