By Anna Hirtenstein and Chong Koh Ping

Global markets retreated Tuesday after a rally in U.S. stocks pushed the S&P 500 index into positive territory for the year.

The S&P 500 declined 1.1% in early New York trading, while the Dow Jones Industrial Average lost 369 points, or 1.3%, and the Nasdaq Composite fell 0.6%, following yesterday's record closing high.

A measure of turbulence in American equities, the Cboe Volatility Index, also climbed to its highest level in a week. The pan-continental Stoxx Europe 600 slipped 1.3%.

"After a rally like we saw yesterday, the temptation is to take profits, " said Luca Paolini, chief strategist at Pictet Asset Management. "There's no shame to neutralize your position and take a pause. The outlook for the global economy is very, very challenging."

The U.S. officially entered a recession in February, according to the National Bureau of Economic Research, marking the end of a 128-month expansion. The downturn may also turn out "to be briefer than earlier contractions," the group said.

In premarket trading, airline stocks pulled back from a multiday rally. Shares of American Airlines declined 7.4%, Delta Air Lines fell 5.6% and United Airlines Holdings slipped 6.1%.

In a sign that the Federal Reserve remains concerned about the prospects for American businesses, the central bank said Monday it will make terms more favorable for its incipient program to extend loans to small and midsize businesses. The initiative, announced in March, is designed to fill a hole left by the government's economic-crisis relief efforts. This is the third time the Fed is amending the program amid public worries that the novel effort to blunt the coronavirus-driven shock might produce underwhelming results.

More than a dozen U.S. states have seen confirmed coronavirus cases increase in the past week at a pace faster than in the week prior, according to a Wall Street Journal analysis of Johns Hopkins data.

"There are questions that still remain," said Luc Filip, head of discretionary portfolio management at SYZ Private Banking. "Will there be a second wave of virus outbreak? Will we have a lot of defaults and bankruptcies? Will this recovery be as strong as expected in the second half of the year?"

Germany's benchmark stock index declined 1.6%. Exports from the trading bloc's biggest economy plunged in April due to the coronavirus pandemic, leading to the indicator recording its steepest monthly decline since the data was first published in August 1990, Germany's statistics office Destatis said Tuesday.

"The export sector is probably the most exposed to the crisis, suffering from the domestic-lockdown measures as much as from lockdowns across the world and supply chain disruptions," said Carsten Brzeski, chief economist for the eurozone at ING. "A rebound here in the coming months will not be the same as a return to normality."

In Asia, some benchmarks closed higher. The Shanghai Composite Index gained 0.6% and Hong Kong's Hang Seng Index added 1.1%. But Japan's Nikkei 225 retreated 0.4% as the yen strengthened 0.5% against the dollar, reversing a recent bout of weakness.

Brent crude, the global gauge of crude-oil prices, slipped 1.5% to trade at $40.20 a barrel, after falling on Monday for the first time in seven sessions.

The WSJ Dollar Index, which measures the U.S. currency against a basket of others, strengthened 0.2% from the lowest level since March 10.

Several European currencies edged lower. The British pound declined 0.5% against the dollar, touching the lowest point since mid-March, and the Norwegian krone slipped 0.9%.

"It's a reversal of currencies that benefited from the ramp up in equity prices," seen in recent weeks, said Kit Juckes, a macro strategist at Société Générale. Investors are buying up safer assets such as the dollar and yen and dumping ones that are perceived to be riskier as sentiment sours.

The yield on the 10-year U.S. Treasury note ticked down to 0.825%, from 0.883% on Monday. Yields move inversely to bond prices.

The gradual recovery of major economies and the massive stimulus rolled out by the Fed has created an "almost perfect" scenario for risky assets like stocks, according to Paul Chew, head of research at Phillip Securities in Singapore.

"With the yield for 10-year Treasury bonds at less than 1%, there isn't much intrinsic value for investors," he said. Investors' appetite for risk will continue to rise as new coronavirus cases in large economies trend downward and more countries reopen, he added.

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com and Chong Koh Ping at chong.kohping@wsj.com