New York's kosher-labeling rules interfere with freedom of religion about as much as St. Patrick's Day celebrations, a federal appeals court has decided.

The 2nd U.S. Circuit Court of Appeals upheld New York's Kosher Law Protection Act, passed in 2004, ruling that it does not interfere with religion in any way and exists solely for preventing fraud.

"The labeling law has the secular purpose of protecting against fraud by informing a consumer that a particular seller believes a product is kosher," the decision released Thursday said, affirming Brooklyn federal court judge Nina Gershon's 2011 opinion.

Thursday's case was the second attempt by Commack Kosher, a deli and butcher shop in Commack, New York, to convince the Circuit that New York's kosher law improperly interferes with freedom of religion.

The first time around, the appeals court allowed the shop's 1996 lawsuit, saying the law at the time wrongly stepped into religious matters by defining the term "kosher." In light of the circuit decision, the legislature passed a revised law in 2004.

On Thursday, the appeals court rejected Commack's attempt at a second bite of the apple.

Unlike its earlier version, the 2004 Kosher Act "did not define kosher or authorize state inspectors to determine the kosher nature of the products," wrote Judge Christopher Droney. He was joined by Judges John Walker and Gerald Lynch.

The court drew a parallel with a St. Patrick's Day parade, which it identified as a secular activity with religious roots. Many people buy Kosher food for non-religious reasons, the decision said, quoting an argument by the State, and they must be protected from fraud.

In its 2008 lawsuit, Commack alleged the kosher law was biased in favor of an Orthodox Jewish definition of kosher food, and thus violated the Establishment Clause. The appeals court, however, noted that the law is aimed at protecting more than just Jews, who represent only about 30 percent of kosher-food consumers, according to New York state.

Robert Dinerstein, a lawyer for Commack, was not immediately available to comment on the decision.

The 2004 law allows food sellers and producers to decide for themselves what kosher practices to follow. It also requires the person who certifies a product as kosher to register with the Agriculture Department. Vendors must keep records of their purchases of kosher meat and poultry, and signs must be posted if both kosher and non-kosher foods are sold in the same store.