The dollar rose 0.3% against the euro as U.S. stocks tumbled on Friday, putting the S&P 500 Index on the verge of confirming it has been in a bear market since hitting a record high in January.

The session's gains for the dollar, however, were not enough to erase sharp losses from earlier this week that have pulled the greenback away from a five-year high against the common currency, on worries its months-long rally may have been overdone.

The U.S. currency has been supported in recent months by a flight to safety by investors, amid a rout across markets due to fears of the impact of soaring inflation, a hawkish Federal Reserve and the Russia-Ukraine conflict.

That rally, however, sputtered this week as increased volatility in global financial markets, coupled with the lofty levels the dollar had scaled in recent months, led investors to reach for the safety of the yen and the Swiss franc.

"After its recent rally, the dollar was due a pause," Jonas Goltermann of Capital Economics, said in a note.

For the week the U.S. currency was down about 1.3%, its worst weekly showing against the euro since early February.

"We see the buck as a bit elevated for sure and see room for other currencies to flourish as there is a gradual shift to better prospects if the global economy is to be helped out and revived from a terrible first half to the year," said Juan Perez, director of trading at Monex USA in Washington.

Other safe-haven currencies have rallied this week as global equities have come under pressure, although stocks in Europe clawed back some ground on Friday.

The Swiss franc was on track for a near 3% weekly gain versus the dollar, its best weekly gain in more than two years, while the Japanese yen was set for an almost 1% weekly gain.

Sterling, up 0.1% on Friday, was set for its biggest weekly gain since December 2020 against the dollar as the latest economic data suggested the market might not need to scale back its expectations for Bank of England rate hikes much further.

In cryptocurrencies, generally weak risk appetite took its toll on bitcoin, which fell 4.23% to $29,009.94.

(Reporting by Saqib Iqbal Ahmed; Editing by Alison Williams and Nick Zieminski)

By Saqib Iqbal Ahmed