Gerard Hogan, an advocate general of the Court of Justice of the European Union, said an EU law of 2009 set out that animals should normally be stunned before they are slaughtered, but made a clear exception for slaughter prescribed by religious rites.
EU judges typically follow the opinions of advocate generals although are not bound to do so. They would normally deliver their ruling in two to four months.
The case came to the EU court in Luxembourg after a 2017 decree in the Belgian region of Flanders to amend its law on protection and welfare of animals by requiring that all animals be first stunned.
Jewish and Muslim association challenged the decree and Belgium's Constitutional Court referred the case to the EU Court of Justice.
Hogan said the religious exception reflected the European Union's desire to respect freedom of religion and the right to manifest religious belief in practice and observance despite avoidable suffering caused to animals.
Jewish and Muslim methods of slaughter involve the animals' throats being cut with a sharp knife, which advocates say results in death almost immediately. Traditionally, prior stunning is not permitted.
Belgian campaign group Global Action in the Interest of Animals (GAIA), whose representatives were present at the court on Thursday, said it was disappointed and perplexed by the opinion, but noted the judges might rule differently.