U.S. stocks fell on Tuesday, resuming their downward trajectory after last week’s rally, while a pledge among European Union leaders to curb oil purchases from Russia lifted crude prices.

The S&P 500 dropped about 0.6% in morning trading, a day after U.S. markets were closed for Memorial Day. The benchmark index had risen 0.6% for the month through Friday, putting it on track to steady after April’s 8.8% loss. The Dow Jones Industrial Average shed 0.7%, while the Nasdaq Composite Index slid 0.6%.

Crude prices climbed after EU leaders said for the first time that they would impose an oil embargo on Russia over its invasion of Ukraine. The embargo would include an exemption for oil delivered from Russia via pipelines, which make up one-third of EU oil purchases from Russia.

Futures for Brent crude, the global benchmark, rose 1.4% to $119.23 a barrel. West Texas Intermediate, the U.S. marker, rose 2.7% to $118.22 a barrel, playing catch-up after the market was closed Monday.

Tuesday’s session will cap another volatile trading month, during which stocks around the world swung wildly as traders tried to assess the outlook for global economies. In the U.S., stocks tumbled shortly after the month began and continued falling amid a slew of earnings and economic data that came in worse than expected. 

Throughout the month, profit warnings from companies ranging from Snap to Target intensified worries about the lingering impact of inflation, and spurred investors to dump shares across several industries.

By mid-May, it seemed the S&P 500 was bound to close in a bear market, defined as a drop of 20% or more from a recent high. But a late-month rally sent stocks racing higher and helped the benchmark index trim its losses. The S&P 500 is down about 14% from its January high. 

Professional and individual investors alike waded into last week’s rally in the U.S. markets, finding opportunities to scoop up stocks that have seen their valuations fall. However, the issues that sent stocks falling earlier this month have yet to abate.

Many traders remain worried that the Federal Reserve’s plans to raise interest rates aggressively could tip the U.S. economy into a recession. Meanwhile, concerns about an economic slowdown in China and sustained supply-chain disruptions due to the pandemic and the war in Ukraine have continued to weigh on investors’ minds.

“There’s a bit of market uncertainty just about the pretty rapid rally we’ve had,” said Brooks Macdonald Chief Investment Officer Edward Park, “and whether that can be sustained in a world where inflation is clearly still a factor.”

New survey data released Tuesday showed U.S. consumer confidence declined slightly in May from the previous months. President Biden is also expected to meet with Fed Chairman Jerome Powell Tuesday at the White House. 

Ten of the S&P 500’s 11 sectors were down on Tuesday. The exception was energy, which rose on the back of climbing oil prices. Marathon Oil and Diamondback Energy both jumped more than 3%.

U.S.-traded shares of

Unilever jumped 8.5% after the consumer-goods company said it would add activist investor Nelson Peltz to its board and disclosed his fund now holds a 1.5% stake.

The S&P 500’s energy sector is on track to finish May with the largest gain among the benchmark index’s 11 groups, extending a trend that has flourished for much of 2022. But even some beaten down-tech stocks are set to end the month in the green, such as Netflix and Zoom Video Communications. 

“When the S&P 500 is [close to entering] a bear market, that has a big psychological impact on those seeking value,” said Craig Erlam, senior market analyst at Oanda. “I think the question repeatedly being asked is, ‘Are we seeing a bottom in the markets?’”

In the bond market, the yield on 10-year Treasury notes rose to 2.862% from 2.748% Friday. Bond yields and prices move in opposite directions.

Overseas, the pan-continental Stoxx Europe 600 fell 0.7%, putting it on track to snap a four-session winning streak, after eurozone inflation rose faster than expected. Consumer prices rose 8.1% on the year in May—the fastest past since records began in 1997—after climbing at a 7.4% rate in April. The inflation report will likely factor into the European Central Bank’s coming interest-rate decisions. Earlier this month, ECB President Christine Lagarde

indicated that the central bank could increase its key interest rate in July for the first time in 11 years.

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

Photo: Courtney Crow/Zuma Press

In Asia, the Shanghai Composite Index rose 1.2% after the city’s government said a two-month lockdown would be lifted Wednesday. The shutdown, designed to limit Covid-19 transmission, had slowed the Chinese economy and added to inflationary pressures elsewhere in the world by gumming up supply chains.

Hong Kong’s Hang Seng rose 1.4%. Japan’s Nikkei 225 fell 0.3%

Write to Caitlin McCabe at caitlin.mccabe@wsj.com and Joe Wallace at joe.wallace@wsj.com