Wall Street stocks shrugged off early weakness to begin the second half of 2022 on a solid note on Friday, but record eurozone inflation underscored the potential for more turbulence ahead.
New York equities spent much of the morning in the red, absorbing an industry survey showing slowing growth in the manufacturing sector.
But US markets reversed course in the final hours of trading, rallying into the Independence Day holiday weekend amid hopes for a better second half of the year.
Investors are coming off the worst six-month start to a year for the S&P 500 since 1970.
Earlier, both Paris and Frankfurt stocks ended the day with small gains despite news of record-high eurozone inflation that reinforced expectations of a European Central Bank interest rate hike later this month.
The EU's Eurostat data agency said annual consumer price inflation in the 19 countries that use the euro soared to 8.6 per cent in June, up from the prior record of 8.1 per cent in May.
"With eurozone inflation now becoming more broad-based in nature, the outlook for the eurozone for the rest of 2022 continues to look bleak," said Pushpin Singh, economist at the Centre for Economics and Business Research.
"This comes amid a mounting possibility of a severe gas crisis in Europe, with Russia using gas exports as a means to counter sanctions."
The ECB last month said it would deliver its first interest rate increase in more than a decade in July to combat inflation.
With the war in Ukraine showing no sign of ending, keeping energy costs elevated, there is an expectation that borrowing costs will continue to rise and send economies into recession.
Comments from top finance chiefs, including Federal Reserve boss Jerome Powell, suggest they are willing to endure the pain of a contraction as long as they can rein in prices, which are rising at their fastest pace in 40 years on both sides of the Atlantic.
"Investors know that inflation is high and is likely to push higher," City Index analyst Fiona Cincotta told AFP.
"Instead, the market's obsession is turning from inflation to recession fears. Given the steep declines in stock prices this week, much of the bad news is priced in for now, until it starts again next week," she added.
The dollar, a safe-haven currency, advanced against the pound and the euro on rising expectations of a recession.
Oil rebounded on tight supplies despite persistent recession concerns.