Iran’s challenge with the ever-increasing electricity consumption has reached new heights, leading the country to halt electricity exports.

Abuzer Salihi, general manager of Iran’s electricity distribution company Tevanir, announced on state television that it has reduced electricity exports to zero “so that there is no problem in electricity supply in the country.” He said that the electricity supply to Afghanistan’s Herat province, which imported 70% of its electricity from Iran, completely stopped in order to meet domestic needs.

According to the numbers shared by Tevanir, the daily electricity demand reached over 65,000 megawatts, while production is around 54,000 megawatts. Aside from the summer heat, Bitcoin (BTC) and crypto mining activities in the country — known for its significant electricity subsidies for the local industry — are listed as one cause of the high power demand.

Iran made crypto mining legal in 2019 to license and regulate miners within the country. But the country has also seen a spike in unlicensed mining activities, with many unlicensed miners using the residential electric grid to power up energy-consuming mining rigs.

Iran’s first measure this year was to fine crypto miners using household energy.

A ban on mining until the hot summer months pass followed. Announced by President Hassan Rouhani in May, the crypto mining ban will last until September to ensure access to electricity for domestic consumption. Rouhani also claimed that 85% of the mining activity in Iran is unlicensed.

Related: Proposed bill in Iran could ban all foreign-mined cryptocurrencies

As a last resort before halting electricity exports, the country also called on all legally operating crypto miners to stop their activities. Eshaq Jahangiri, the first vice president of Iran under Rouhani, made the announcement during a meeting with officials of the Ministry of Energy. “We will ensure that the electricity will not be cut off in essential and important places,” he said.

Meanwhile, Iran continues its crackdown on illegal mining activities. Last month, authorities confiscated more than 7,000 mining rigs at a farm operating in the capital of Tehran