(JTA) — A de facto ban in Poland imposed last year on the slaughter of animals without stunning, which includes the kosher and halal rituals, is unconstitutional, a Polish court ruled.

On Wednesday, a 5-4 majority of Polish Constitutional Tribunal justices ruled that the ban ran contrary to the country’s constitution, the European Jewish Association, a Brussels-based lobby group that has fought to scrap the ban, said in a statement.

The ruling was on a petition that argued the ban violated the European Convention on Human Rights and led to “discrimination in social and economic life of Jews in Poland,” polska.newsweek.pl reported.

The Union of Jewish Religious Communities in Poland was among several entities that appealed the ban. The union filed its petition with the tribunal over a year ago to review the case.

Rabbi Pinchas Goldschmidt, president of the Conference of European Rabbis, said in a statement that the ruling meant that “shechitah can continue in Poland as it has done for generations.” He thanked Poland’s chief rabbi, Michael Schudrich, for his efforts to reverse the ban.

Rabbi Menachem Margolin, director of the European Jewish Association, said the ruling was a “relief” because it “prevents a dangerous precedent that would have affected all European Jewry.”

Ritual slaughter was banned in Poland starting Jan. 1, 2013, after the country’s constitutional court scrapped a government regulation that exempted Jews and Muslims from a law requiring the stunning of animals prior to slaughter. Jewish ritual slaughter, or shechitah, as well as Muslim ritual slaughter, or halal, requires that animals be conscious before their necks are cut.

Before the ban, Poland had a $500 million industry of halal and kosher meat for export.

In July 2013, a draft bill aimed at legalizing ritual slaughter failed to pass in the parliament.

On March 5, KRIR, or the National Council of Agricultural Chambers in Poland, filed a bill that would legalize ritual slaughter. With the Constitutional Tribunal’s judgment, the parliament will now take up the bill.