Iranians feeling the squeeze from U.S. sanctions targeting the Islamic Republic's ailing economy are increasingly turning to such digital currencies as Bitcoin to make money, prompting alarm in and out of the country.

In Iran, some government officials worry that the energy-hungry process of "mining" Bitcoin is abusing Iran's system of subsidized electricity; in the United States, some observers have warned that cryptocurrencies could be used to bypass the Trump administration's sanctions targeting Iran over its unraveling nuclear deal with world powers.

The Bitcoin craze has made the front pages of Iranian newspapers and has been discussed by some of the country's top ayatollahs, and there have been televised police raids on hidden computer farms set up to bring in money by "mining" the currency.

Like other digital currencies, Bitcoin is an alternative to money printed by sovereign governments around the world. Unlike those bills, however, cryptocurrencies are not controlled by a central bank. Bitcoin and other digital currencies like it trade globally in highly speculative markets without any backing from a physical entity.

WHAT CAN YOU BUY WITH BITCOINS?

As a result, computers around the world "mine" the data, meaning they use highly complex algorithms to verify transactions. The verified transactions, called blocks, are then added to a public record, known as the blockchain. Any time "miners" add a new block to the blockchain, they are rewarded with a payment in bitcoins.

To work, the expensive specialized computers require a lot of electricity to power their processors and to keep them cool. In Iran, "miners" have an edge because electricity is cheap thanks to longtime government subsidies. "Miners" also buy cheaper Chinese ready-made computers to do the work.

But the constant raids and authorities' conflicting statements on the issue have Bitcoin "miners" in Iran incredibly leery of being identified. Those contacted by The Associated Press refused to speak about their work or to say how much they earn from their "mining."

But they acknowledge they do this to make some money at a time when Iran's currency, the rial, tumbled from 32,000 rials to $1 at the time of the 2015 nuclear deal, to around 120,000 rials to $1 now.

"It is clear that here has turned into a heaven for 'miners,'" Mohammad Javad Azari Jahromi, Iran's minister for information and communications technology, recently told AP in an interview. "The business of 'mining' is not forbidden in law but the government and the Central Bank have ordered the Customs Bureau to ban the import of (mining machines) until new regulations are introduced."

Ali Bakhshi, the head of the Iran Electrical Industry Syndicate, said earlier this month that the country's Energy Ministry likely would boost costs for Bitcoin "miners" to 7 cents for each kilowatt of electricity they consume, a massive increase from the current half-cent but still almost half the cost of electricity in the United States, according to the semi-official Fars news agency.

Still, there are concerns, especially among Iran's religious leaders, that people might try to circumvent paying extra for the electricity as well as using digital currency to hide or move money illicitly.

BITCOIN PRICE TUMBLES FOLLOWING TRUMP'S CRITICISM

Tabnak, a hard-line news website associated with a former commander of the country's paramilitary Revolutionary Guard, quoted three ayatollahs describing Bitcoin as either problematic or "haram," meaning forbidden. Islam prescribes strict rules about finance.

But Jahromi said clerics became more receptive to the idea after his staff briefed them that Bitcoin had a value in the real world, which is required under Islamic finance. Islamic finance also prohibits gambling, the payment of interest and misleading others.

"Some of our top clerics have issued fatwas that say Bitcoin is money without a reserve, that it is rejected by Islamic and cybercurrencies are haram," Jahromi said. "When we explain to them this is not a currency but an asset, they change their mind."

IRAN ADMITS SEIZURE OF FOREIGN TANKER, 12 CREW MEMBERS IN STRAIT OF HORMUZ

Iran has tried to keep its economic situation in check by controlling foreign currency rates and cutting down on those moving their money from the rial to other currencies, including Bitcoin. Last year, the semi-official Mehr news agency quoted Mohammad Reza Pour-Ebrahimi, the head of the Iranian parliament's economic commission, as suggesting that about $2.5 billion left Iran through digital currency purchases. He did not elaborate and authorities have not discussed it since.

The U.S., meanwhile, has been keeping a close watch on Iranians holding bitcoins. In November, a federal grand jury in Newark, New Jersey, accused two Iranian men of hacking and holding hostage computer systems of over 200 American entities to extort them for Bitcoin, including the cities of Newark and Atlanta.

"As Iran becomes increasingly isolated and desperate for access to U.S. dollars, it is vital that virtual currency exchanges, peer-to-peer exchangers and other providers of digital currency services harden their networks against these illicit schemes," said Sigal Mandelker, Treasury's undersecretary for terrorism and financial intelligence.

CLICK HERE TO GET THE FOX NEWS APP

Not so, said Jahromi.

"Cybercurrencies are effective in bypassing sanctions when it comes to small transactions, but we do not see any special impact in them as far as mega-transactions are concerned," he said. "We cannot use them to go around international monetary mechanisms."