Penitents of the 'El Cachorro' brotherhood join their church to parade during the Easter procession in Sevilla on March 25, 2016 | Cristina Quicler/AFP via Getty Images EU top court rules Spanish Catholic Church tax breaks may be illegal A tax break for a Catholic school could be illegal, ECJ said.

The European Court of Justice (ECJ) ruled Tuesday that certain tax exemptions for the Catholic Church in Spain may be unlawful state aid.

The case in question involved a tax refund for a Spanish Catholic school. A religious congregation of the Spanish Catholic Church sought to claim a refund of almost €24,000 on a municipal tax stemming from the construction of a new school building. The local tax authority denied that request and the congregation took it to court.

While an agreement between Spain and the Holy See dating from before Spain’s accession to the European Communities allowed various tax exemptions for the Catholic Church, the tax authority argued the new building did not have a strictly religious purpose (which may have made it eligible for state subsidies) and so did not qualify for the refund.

A Spanish court referred the case to the ECJ to determine whether the tax exemption was illegal state aid.

The ECJ said the tax exemption satisfied two of the four criteria of illegal state aid by using state resources to give a selective economic advantage to the congregation running the school, and potentially fulfilled a third criteria by making the congregation's schools more attractive than others that didn't get the same advantage.

But the court pointed out that aid that amounted to less than €200,000 over any period of three years did not affect trade between EU countries and didn't distort competition. The ECJ said the Spanish court will need to decide whether the case reached that threshold.