By Anna Hirtenstein, Chong Koh Ping and Karen Langley

The S&P 500 fell Tuesday, pausing a powerful rally that had briefly returned the broad U.S. stock index to positive territory for the year.

The benchmark index dropped 0.7%, and the Dow Jones Industrial Average lost about 215 points, or 0.8%. The tech-heavy Nasdaq Composite, meanwhile, gained 0.1%, after notching on Monday its first record close since the coronavirus pandemic sent stocks tumbling.

All three major U.S. stock indexes have surged more than 40% from their March lows, as investors grew optimistic about the economic recovery.

"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 coronavirus and efforts to control its spread have had a severe effect on the economy. 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 future course of the pandemic remains unclear. 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?"

Most sectors of the S&P 500 lost ground, while the communication services and technology groups -- among the best performers this year -- edged higher. Shares of small companies, which are considered sensitive to the strength of the economy, halted their recent rally, with the Russell 2000 index sliding 2.2%.

Airline stocks pulled back after a multiday rally. Shares of American Airlines Group declined 9.2%, Delta Air Lines fell 6.6% and United Airlines Holdings dropped 6.5%.

In a sign that the Federal Reserve remains concerned about the prospects for American businesses, the central bank said Monday that 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.

There are signs investors see more volatility on the horizon. A measure of turbulence in American equities, the Cboe Volatility Index, climbed to its highest level in a week.

Corporate earnings are expected to decline sharply in the second quarter. In the months to come, investors will watch for companies to offer guidance about their future performance.

"Right now the markets seem to be running on euphoria because of what the central banks have done, low interest rates, the fact that we're starting to see some positive momentum out of the reopenings," said Megan Horneman, director of portfolio strategy at Verdence Capital Advisors. "Going forward, we need to see that translate into earnings growth."

The yield on the 10-year U.S. Treasury note ticked down to 0.827%, from 0.883% on Monday. Yields fall as bond prices rise.

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.

The drop in U.S. stocks Tuesday followed declines overseas. The pan-continental Stoxx Europe 600 fell 1.1%. Japan's Nikkei 225 retreated 0.4%, though other Asian indexes ended the day higher.

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."

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com, Chong Koh Ping at chong.kohping@wsj.com and Karen Langley at karen.langley@wsj.com