The Indonesian Ulema Council (MUI), a top body of clerics, has ruled that using cryptocurrencies as a means of payment is unlawful in Islam, but trading of digital assets could be allowed, one of its leaders said on Thursday.

Indonesia, the world’s biggest Muslim majority country, bans the use of crypto as a currency, but investment in and trading of the digital tokens are allowed in the commodities and futures market.

The total value of cryptocurrency trading in the commodity bourse has reached 370 trillion rupiah ($25.96 billion) this year to May, according to the trade ministry.

The total trading at the end of 2020 was valued at 65 trillion rupiah. The number of traders has reached 6.5 million up from 4 million.

As a means of payment, cryptocurrencies are forbidden according to Shariah law because they carry elements of uncertainty and harm, and are in violation of state laws, Asrorun Niam Sholeh, the MUI’s head of religious decrees, told Reuters.

Trading of cryptocurrencies as a commodity is also unlawful, with the MUI likening it to gambling, because it does not meet Islamic rules, such as for the goods to have a physical form, a clear value, and a known exact amount, among other reasons, he said.

However, the MUI allows trading of cryptocurrencies that meet Islamic rules, have an underlying asset and carry clear benefits, Asrorun said.

The commodities exchange allows trading of hundreds of cryptocurrencies that meet requirements of safety and good governance of the blockchain system.

The MUI’s decree is not legally binding as it is not part of the government, but its ruling may affect investment decisions by some Muslims.