NEW YORK - Pessimism about the outlook for the global economy boosted demand for the safe haven U.S. dollar on Friday while the Australian dollar, a proxy for global growth, tumbled to a two-year low.

Rampant inflation and a rush by central banks to raise rates and stem the flow of cheap money has fueled sell-offs across markets and lifted assets seen as safer bets.

“When people get worried they still buy dollar assets,” said Joseph Trevisani, senior analyst at in New York.

The dollar gained on Friday even as concerns about an economic downturn sent benchmark 10-year U.S. Treasury yields to one-month lows. The greenback is being swayed between concerns that the Federal Reserve will continue to hike rates aggressively in an effort to blunt soaring price pressures, and the likelihood that this tightening will hurt the economy.

“You have weakening rates against the dollar competing against fear of a global recession and enormous amounts of debt and all sorts of other problems,” Trevisani said.

Expectations on how high the U.S. central bank will be able to raise rates have fallen, with traders now pricing in a peak rate of 3.33% in March, down from previous expectations of around 4% before the Fed’s June meeting.

The Fed’s benchmark rate is currently 1.58%. The dollar index gained 0.63% against a basket of currencies to 105.39. It is holding just below a 20-year high of 105.79 reached on June 15.

The euro fell 0.78% to $1.0400. The single currency reached a five-year low of $1.0349 on May 13. Data on Friday showed that euro zone inflation hit another record high in June, while manufacturing production in the bloc fell for the first time in two years.

The European Central Bank is expected to raise interest rates this month for the first time in a decade, although economists are divided on the size of any hike. Risk-sensitive currencies underperformed.

The Australian dollar fell as low as $0.6764, the weakest since June 2020.

"It's a risk-off start to the second half of the year with equities and commodities down, so the dollar is stronger pretty much across the board," said Kenneth Broux, an FX strategist at Societe Generale in London.

The Reserve Bank of Australia decides policy on Thursday, and markets expect a half point hike to its key rate.

Sterling reached a two-week low of $1.20 a day after official data showed a record shortfall in Britain's current account deficit in early 2022.

The dollar dipped 0.35% against the Japanese yen to 135.31. The Japanese currency hit a 24-year low of 137.01 per dollar on Wednesday.

In cryptocurrencies, bitcoin resumed its slide lower, slipping 2.88% to trade just above $19,351. 

(Additional reporting by Iain Withers in London; Editing by Alison Williams)