Kazakhstan welcomed the Bitcoin miners that China banned. Now an energy crisis is forcing some miners to relocate—again

On Wednesday, crypto mining firm Xive announced that it is moving a crypto mining farm out of southern Kazakhstan because of electricity shortages.

“Sad to shut down our mining farm in south [Kazakhstan],” Xive cofounder Didar Bekbau, wrote in a tweet, tying the decision to the “country risk” of operating a crypto mining farm in the southern part of the central Asian nation.

Bekbau told CoinDesk that southern Kazakhstan is no longer a viable place for crypto mining farms owing to electricity shortages and a national grid that makes it hard to transfer power from energy-rich areas in the north to more energy scarce regions in the south. Bekbau did not say if he was moving out of the country entirely but claimed that some crypto mining operations are moving from Kazakhstan to places like Russia and the U.S. because of the lack of consistent power. Xive did not immediately respond to Fortune’s request for comment.

Currently, Kazakhstan ranks second behind the U.S. in global Bitcoin mining, accounting for 18.1% of the global Bitcoin mining hashrate, up from 8.8% in June, according to the Cambridge Centre for Alternative Finance. Hashrate measures the computational power in crypto mining.

Miners flocked to Kazakhstan after nearby China banned crypto mining in May. Kazakhstan welcomed China’s cast-off miners with open arms. Since 2019, Kazakhstan has invested hundreds of millions of dollars to support crypto mining operations, believing that its cheap and abundant supply of fossil fuels—essential for mining—could lure the industry and unlock a new source of government revenue. A government report in October estimated that taxes from crypto mining farms could contribute $1.5 billion in government revenue in the next five years.

But the mining boom has strained Kazakhstan’s energy supply, which is largely powered by coal production in the northern part of the country. Kazakhstan has faced rolling blackouts in different parts of the country since July. In late October, Russian state-controlled energy firm Inter RAO announced it would export energy from Russia to Kazakhstan to shore up the nation’s energy supply to prevent severe power shortages during Kazakhstan’s cold winter when more energy is needed to heat buildings and homes.

Kazakh lawmakers, meanwhile, have blamed energy shortages on crypto mining farms. Kazakhstan’s first deputy energy minister Murat Zhurebekov said in a press conference in early November that crypto mining had created an 8% surge in energy demand on the national grid this year. Usually, electricity demand increases by 1% to 2% each year, he said.

But Kazakhstan has been careful to appear friendly toward crypto mining despite the burden the industry has placed on its energy grid; officials are pushing for more regulations of the sector as opposed to a complete ban.

Kazakh officials say that gray, or illegal, crypto mining operations are the real root of Kazakhstan’s energy woes. Kazakhstan’s government estimates that illegal mining farms may be consuming as much as twice the amount of electricity as registered farms.

“Kazakhstan is not going to just watch illegal miners consume electricity and contribute to the shortage,” Zhurebekov said in the press conference.

The unregulated farms have also meant that the government has thus far seen little benefit from the mining boom.

“We are the No. 2 country in the world for cryptocurrency [Bitcoin] mining, and we practically do not see financial returns,” Kazakhstan President Kassym-Jomart Tokayev said in a speech on Friday.

Still, Kazakhstan seems committed to ensuring its bet on crypto mining will eventually pay off. Tokayev said at a meeting on Friday that the government will likely need to construct nuclear energy plants—an unpopular concept in the country—to shore up the nation’s power supply in the long term.

This story was originally featured on Fortune.com