Cryptocurrency investors got hammered Tuesday, with losses wiping out more than $100 billion in market value overnight and slashing most of bitcoin’s gains for the year.

The most popular and valuable token fell more than 9 percent before recovering somewhat in the afternoon, briefly sending the digital currency below $30,000, a significant benchmark not seen since January. Though long-term holders are typically better suited to weather the volatility of the cryptocurrency, the prolonged slump has erased most of the astronomical gains built up this year. And those who purchased near bitcoin’s all-time high of $64,000 have seen their investments cut by more than half.

By late afternoon Eastern time, bitcoin was trading around $32,000, turning positive for the day.

The slide and rebound followed reports that China has ramped up its crackdown of bitcoin miners in the country, part of a continuation of Beijing’s antagonistic approach to cryptocurrency. To reduce energy consumption in support of their climate goals, Chinese authorities have sent miners scattering.

The networks on which digital currencies run require robust computing power to execute transactions and other purposes, such as generating a fresh supply of cryptocurrency. But those maneuvers require large amounts of energy, a long-standing concern of environmentalists and other critics.

Elon Musk, the chief executive of Tesla, said earlier this month that his all-electric vehicle company would return to accepting bitcoin as payment once it confirms that enough miners are using renewable energy to power their networks.

While the pronouncement highlighted the great electricity demands of crypto operators, it also illustrated how Musk and other big personalities can influence the market.

Dogecoin, the popular meme token that has been a window into the exuberance of the crypto market, sank more than 6 percent, to about 19 cents — well off the high of 72 cents set last month, leading up to Musk’s appearance on “Saturday Night Live.”

As with other digital currency sell-offs, bitcoin’s plummet has dragged much of the market with it. Most of the 20 largest tokens by market cap fell on Tuesday, several by double digits, according to CoinMarketCap, the cryptocurrency tracker. Even as tokens recovered some lost ground in afternoon trading, the overall market has shed more than $1 trillion since May, when investor optimism fueled a record-shattering run.

On Monday, China’s major state-owned banks reiterated their commitment to not facilitate the trading of cryptocurrency, reinforcing a previous ban Chinese authorities put in place to shield their economy from added risks.

Officials there have tightened rules against processing cryptocurrency and last month banned payment companies from providing services tied to crypto transactions, issuing another warning to investors and sending jitters through the market.

Meanwhile, in Iran, as part of an effort to reduce the frequency of power outages during a hot summer, the government banned the mining of cryptocurrencies last month, blaming operators for the heightened electricity demand. On Tuesday, state media said Iranian police seized 7,000 computer miners in an abandoned factory west of the capital city of Tehran, Reuters reported.

In the United States, Biden administration officials are reviewing potential oversight measures related to the speculative trading of the crypto market and cryptocurrency’s potential uses to facilitate crime. The White House and the Treasury Department are also backing a new plan to target cryptocurrency as part of a broader effort to curb tax avoidance.

Other national governments, however, are embracing crypto. Nayib Bukele, the president of El Salvador, backed legislation making bitcoin legal tender, allowing Salvadorans to use the token to buy goods or pay taxes. But analysts remain skeptical of bitcoin’s use as a stable currency because of its extreme price volatility.

Crypto’s staggering climb this year has coincided with record gains in the stock market and the emergence of “meme stocks,” pulling in waves of new investors attracted in part by the excitement generated on online forums.

Wall Street has wrestled with its own volatility in recent days. After Friday capped the worst trading week since October, stocks rebounded Monday and set all-time highs Tuesday.

The tech-heavy Nasdaq advanced 111.79 points, or 0.8 percent, to close at 14,253.27, its highest level. The S&P 500 climbed 21.65 points or 0.5 percent, to finish at 4,246.44, just shy of its all-time high. The Dow Jones industrial average added 68.61 points, or 0.2 percent, to end at 33,945.58.

For months, market observers had been anticipating how the Federal Reserve would react to an improving economic outlook and whether central bankers would signal an interest rate hike to curb inflation. While fears of climbing prices have weighed on investors, some analysts say the interest-rate concerns may have been overstated.