Investors sold stocks and government bonds after Federal Reserve Chairman Jerome Powell reiterated the central bank’s commitment to controlling inflation through a rapid series of interest-rate increases.

The S&P 500 edged lower by 1.94 points, or less than 0.1%, to close Monday at 4461.18 following comments from Mr. Powell about the possibility of more-aggressive interest-rate moves to tame inflation. Treasury yields rose following his comments, reaching their highest level since May 2019.

The tech-focused Nasdaq Composite Index lost 55.38 points, or 0.4%, to 13838.46, while the Dow Jones Industrial Average slipped 201.94 points, or 0.6%, to 34552.99. Major U.S. stock indexes on Friday finished their best week since November 2020.

Boeing shares fell $6.93, or 3.6%, to $185.90 after a Boeing 737 passenger plane operated by China Eastern Airlines carrying more than 130 people crashed in southern China.

Mr. Powell, speaking at the National Association for Business Economics, said the U.S. central bank was prepared to raise interest rates in half-percentage-point steps—and high enough to deliberately slow the economy—if needed.

“Investors are taking Powell’s transparency as a step further to say ‘He’s just preparing us for the worst,’” said Shannon Saccocia, chief investment officer at Boston Private. “Whereas, the bond market is saying, ‘No, no, he’s telling you he’s going to do at least seven [rate increases], and you aren’t listening.’”

The yield on the benchmark 10-year Treasury note rose to 2.315%. Yields and prices move inversely. Investors expect additional interest-rate increases from the Fed this year as the central bank aims to slow inflation that is running at its highest levels in four decades. Analysts say higher yields could sap investor appetite for riskier assets.

“I wouldn’t say bonds look like a phenomenal investment at this point in time, but they are definitely more balanced than they were earlier into the year,” said Matt Dmytryszyn, chief investment officer at Telemus.

The Ukraine war has heightened volatility in stocks, bonds, commodities and currencies as investors try to assess the economic impact of sanctions and the potential for disruptions to supply chains. Investors are monitoring developments out of the region and whether a resolution can be soon found.

“This is the main driver of markets in the coming days and maybe even weeks—it is about everything that comes out of the Ukraine conflict,” said Carsten Brzeski, ING Groep’s

global head of macro research. 

In individual stocks, Shares of Nielsen Holdings dropped $1.68, or 6.9%, to $22.76 after it rejected a roughly $9 billion takeover offer from a private-equity consortium, saying that the offer undervalued the TV-ratings company. Shares of insurer Alleghany Corp. soared $167.85, or 25%, to $844.60 after Berkshire Hathaway said it agreed to buy the company for about $11.6 billion in cash.

Brent-crude futures, the international benchmark, added $7.69 a barrel, or 7.1%, to $115.62. West Texas Intermediate futures, their U.S. counterpart, were up $7.42 a barrel, or 7.1%, to $112.12. Most of the S&P 500’s 11 sectors fell Monday; one of the few exceptions was energy, which rose 3.8%. Occidental Petroleum rose $4.72, or 8.4%, to $60.96; Hess added $6.44, or 6.6%, to $103.85 and Exxon Mobil gained $3.53, or 4.5%, to $82.20.

Elevated oil prices have prompted concerns of sustained high inflation and lower economic growth in the U.S. and Europe, as gas and energy prices eat away at household spending on other goods and services. 

Support for a European Union-wide ban on the purchase of Russian oil is growing inside the bloc, according to diplomats involved in the discussions, which could send prices even higher. Russia’s invasion of Ukraine has drawn focus on Europe’s reliance on Russian energy, with Germany getting over half of its gas from Russia.

“We have this growing awareness that a couple of supply chains could be broken for good. Energy prices, no matter how the war resolves, will remain high,” Mr. Brzeski said. 

Traders worked on the floor of the New York Stock Exchange on Friday.

Photo: Spencer Platt/Getty Images

The pan-continental Stoxx Europe 600 traded up less than 0.1%. Russia’s stock market remains closed, but trading of Russia’s local-currency government bonds resumed Monday. Russia’s central bank said it would purchase government bonds. Gov. Elvira Nabiullina

said last week that the Moscow Exchange would reopen gradually but provided no details beyond the bond buying.

The Egyptian pound fell by more than 13% against the dollar Monday after Egypt’s central bank raised its key interest rate at a meeting of policy makers that was brought forward by three days, citing the pickup in inflation pressures it sees following Russia’s invasion of Ukraine.

As with many countries in Africa, Egypt has relied heavily on Ukraine and Russia for its imports of wheat. According to the United Nations, more than 80% of its wheat imports came from the warring countries between 2018 and 2020.

Major indexes in Asia closed with mixed performance. South Korea’s Kospi fell 0.8% and Hong Kong’s Hang Seng declined 0.9%. China’s Shanghai Composite edged up 0.1%. Markets in Japan were closed for a holiday.

—Anna Hirtenstein contributed to this article.

Write to Caitlin Ostroff at caitlin.ostroff@wsj.com and Hardika Singh at hardika.singh@wsj.com