BITCOIN and China always made odd bedfellows. Devotees of bitcoin love its independence from central authorities; in China the central authorities love their power. That they would accept a cryptocurrency that weakened their control over something as fundamental as the management of money seemed unlikely. Yet China had become the world’s biggest bitcoin market, dominating both its trading and computer-powered “mining”.

It was not meant to be. Bitcoin’s surprising success in China appears to be nearing its end. A series of bans announced over the past month have made clear that bitcoin and all fellow travellers, from ethereum to litecoin, have little place within its borders. Some hope that the bans are temporary. The government has, after all, declared an ambition to make China a leader in the blockchain technology that is integral to bitcoin. But it seems more likely that officials will tighten their grip on China’s remaining crypto-coin bastions.

Bitcoin had been in trouble in China since February, when the central bank, aiming to stem illicit capital flows, ordered exchanges to halt virtual-currency withdrawals until they could identify their customers. China’s share of global bitcoin-trading went from more than 90% to just about 10% (see chart).

As bitcoin-trading slumped, attention shifted to other cryptocurrencies and their cousins, crypto-tokens. These are issued in Initial Coin Offerings (ICOs), which allow startups to raise cash. But on September 4th regulators banned ICOs, calling them a form of illegal fundraising. And that presaged an even harsher step, an order that all virtual-currency exchanges shut by the end of the month. Why the government acted at this moment is unclear, but it dovetails with a campaign to rein in financial risk that has been running for a year. With bitcoin looking like an ever-frothier bubble and a five-yearly Communist Party congress in October, stability is the paramount goal. China’s crackdown initially sent shock waves through global crypto-markets. The bitcoin price tumbled by 35% from its highs before the ICO ban to its low point, on news of the exchange closures. But it has since rebounded by more than 20%. Many bitcoin fans are keeping the faith. Nevertheless, for investors in China, the closure of the exchanges could be a lethal blow. The government has not made it illegal for individuals to own bitcoin. But they can do little with it. In theory they can still trade in private, but liquidity will be much lower than on exchanges. If they shift to exchanges outside the country, they would run afoul of capital controls. Moreover, there is talk that regulators might block web access to offshore trading sites.

For now, China’s bitcoin miners can continue excavating their digital ore. They create some 70% of new bitcoins by operating the computers that do the number-crunching that underpins the cryptocurrency. Chinese firms benefit from cheap equipment and cheap electricity, setting up in remote parts of the country where plenty of power plants have excess capacity. But miners fear their days are numbered. The government could declare them illegal. Or it could try to undermine them by slowing their connections with trading platforms outside China.

The global impact of China’s demise as a bitcoin hub is not straightforward. Cutting such a big economy out of the action might seem obviously negative. But as the rebound in bitcoin prices has shown, investors are, for the moment, not overly concerned. The possibility of a crackdown in China had loomed over the market for years. What’s more, if Chinese miners are forced to the sidelines, there will be more room for others. The ban in China may also ease the currency’s governance problems. It weakens the influence of Chinese miners, who have clashed with Western bitcoin developers.

A bigger threat is that other countries follow China’s lead. Regulators are stirring. In America, the Securities and Exchange Commission announced this week that it would create a cyber unit, which, among other things, will tackle misconduct in digital currencies. In Japan, hitherto a haven, the Financial Services Agency will start placing exchanges under close surveillance in October. Australia, Canada and Europe are talking of tougher rules. China, in other words, might still be at the vanguard of the cryptocurrency world, but exercising the kind of leadership that bitcoin boosters least want to see.