NEW YORK (AFP) – US shares ended with modest gains on Thursday, recovering from early losses in the wake of the European Central Bank’s largest rate hike ever and more hawkish comments from the US Federal Reserve.

Prior to the close, the New York Stock Exchange observed a minute of silence to honor the passing of Britain’s Queen Elizabeth II, the nation’s longest-serving monarch.

After the double blow from the central banks working to combat surging inflation by front-loading aggressive steps, Wall Street equities bounced back from a midday slump, with gains accelerating late in the trading session.

ECB policymakers raised the key policy interest rates by 75 basis points and promised more rate hikes, while Fed chairman Jerome Powell reaffirmed his message that the US central bank must continue to act “strongly” to avoid a repeat of the inflation surge of the 1970s and 1980s.

“We need to keep at it until the job is done to avoid … the kind of very high social costs” of that era, Powell said Thursday, echoing the major speech he made two weeks ago, while again dousing investor hopes the Fed might pivot to rate cuts in the near future.

Despite the tough talk, the Dow Jones Industrial Average rose 0.6 per cent to finish at 31,774.52.

The broad-based S&P 500 gained 0.7 per cent to end at 4,006.18, while the tech-rich Nasdaq Composite Index increased 0.6 per cent to 11,862.13.

Among individual stocks, spice maker McCormick & Company fell 6.7 per cent after it lowered its 2022 earnings and sales forecast Thursday citing pressures on consumers and supply chain problems.