New Jersey could become the last state in the nation to ban the sale of homemade baked goods.

A judge in Wisconsin -- the only other state to have such a ban -- will soon hear from attorneys on behalf of three women seeking to overturn Wisconsin's law, according to the Journal Sentinel.

Both states currently ban the sale of home-baked cookies, muffins and other treats to the public citing health concerns and unfair competition against established businesses.

In New Jersey, home bakers need to either rent a commercial kitchen or install one in their homes, costing about $12,000. They are also subject to inspection by the state Department of Health and Senior Services.

Many home bakers in New Jersey have been lobbying to overturn the state's ban for years. A few years ago, a measure passed New Jersey's lower house, but state Sen. Joe Vitale ultimately refused to bring it up for a vote.

Similar legislation in Wisconsin has also failed over the years due to opposition by legislators in that state who say it would hurt commercial businesses.

A judge in Lafayette County, Wisconsin, will hear the challenge Thursday.

The Associated Press contributed to this report.

Spencer Kent may be reached at skent@njadvancemedia.com. Follow him on Twitter @SpencerMKent. Find the Find NJ.com on Facebook.