LONDON - The dollar rose to fresh two-decade highs on Thursday as concerns that tighter monetary policies to tame surging inflation will hurt the global economy dampened risk sentiment and drove investors into the safe-haven currency.

Data on Wednesday showed U.S. consumer price growth slowed sharply in April, suggesting that inflation had probably peaked, though it was likely to stay hot.

The dollar benefited as the data confirmed expectations for further aggressive hikes in interest rates by the Federal Reserve and investors fretted that central bank tightening could slow global economic growth.

Asian stocks fell to an almost two-year low, European shares tumbled and oil prices were down 2%.

Against this backdrop, the dollar index, which measures the greenback's strength against a basket of six currencies, rose 0.4% to 104.44, its highest since December 2002.

Despite increasing expectations of a rate hike in July, the euro remained under pressure on fears that the war in Ukraine and rising energy prices could tip the eurozone into recession later this year.

"The market was already priced for this, but we can now have a high level of confidence that the ECB will hike in July," strategists at MUFG said.

The euro fell 0.5% to $1.0463, after hitting its lowest since January 2017 at $1.044.

"The risk sentiment soured further due to the disappointing news regarding China's Covid situation," Mizuho strategists said. "Two new infections in Shanghai were reported, which reset the timeline for ending the lockdown."

Shanghai authorities combed the city on Thursday for its last COVID-19 cases to clear the way for an exit from a painful six-week lockdown.

China's yuan fell as low as 6.8150 per dollar, its lowest since September 2020, and was last down 0.7% at 6.8125.

The yen rose 1% against the dollar but was not far from its lowest level since April 2002 as hawkish Federal Reserve rhetoric continued to weigh on the Japanese currency.

A Bank of Japan policymaker said it was inappropriate to change monetary policy to control exchange rates, brushing aside the idea of countering sharp yen falls with interest rate hikes.

Bitcoin meanwhile fell to its lowest in 16 months on Thursday, leading a rush out of risk assets, such as tech stocks, while the collapse of TerraUSD, a so-called stablecoin, underscored the strain on cryptocurrency markets.

Bitcoin, the world's largest cryptocurrency, dropped 3% to $27,584, after hitting its lowest since December 2020. It has lost a third of its value in the last eight sessions.

(Reporting by Stefano Rebaudo and Kevin Buckland; Editing by Sam Holmes and Bradley Perrett)