By Pete Schroeder

A recent run of optimism in markets hit the brakes on Tuesday as investors mostly pulled back from stocks, though the Nasdaq extended its record run to a new high, while the safe-haven yen, Swiss franc and gold rallied.

A slide in Europe and partially on Wall Street capped a rally that has pushed Asian stocks outside of Japan overnight higher for a ninth straight day.

Oil prices closed higher as concerns about a resurgence in coronavirus cases were offset by recent commitments from the major oil producers to rein in production.

The tech-heavy Nasdaq Composite shook off early losses to close higher and briefly cleared 10,000 points for the first time. Apple, up 3.2%, gave the Nasdaq its biggest boost.

The Dow Jones Industrial Average and S&P 500 both slid.

MSCI's gauge of stocks across the globe fell 0.46%, about 6% below its all-time peak in February.

The sell-off in equities was the result of a tremendous rally over the past week, said Mike Zigmont, head of trading at Harvest Volatility Management in New York.

"There's no news headline that screams bearish catalyst to me," he said. "But conversely, other than the nonfarm payrolls data, the past two weeks haven't had super bullish catalysts either."

The rally in U.S. stocks accelerated last week after strikingly upbeat May jobs data bolstered the notion that the worst of the economic fallout from the pandemic was over.

The benchmark S&P 500, which erased its losses for the year on Monday, slid back into negative territory and is about 5% below its all-time high.

The Dow Jones Industrial Average fell 300.14 points, or 1.09%, to 27,272.3. The S&P 500 lost 25.21 points, or 0.78%, to 3,207.18 and the Nasdaq Composite added 29.01 points, or 0.29%, to 9,953.75.

Attention now turns again to the U.S. Federal Reserve, which kicked off a two-day meeting on Tuesday. No major policy announcements are expected when the session ends on Wednesday, but the U.S. central bank will issue its first economic projections since December. Investors will be watching as the Fed attempts to gauge the economic cost of widespread pandemic-related lockdowns, as well as any hints of future stimulus.

The safe-haven yen and Swiss franc both gained against the dollar for a second straight day this week.

The yen rose to one-week highs against the dollar, while the Swiss franc climbed to its highest in more than two months versus the greenback.

LOOMING IMPACT

After a brutal March for global equity markets amid concern over both the short- and longer-term damage to the world economy from the coronavirus pandemic, most indices are near pre-COVID-19 levels.

But fears of renewed trade tensions between the United States and China and the broader economic impact from the pandemic, such as higher unemployment and looming bankruptcies, are hanging over the outlook.

The number of layoffs in the United States dropped in April, but were still high enough to be the second most on record. At the same time, hiring hit an all-time low, the Labor Department reported on Tuesday.

In its latest Global Economic Prospects report on Monday, the World Bank said advanced economies are expected to shrink 7.0% in 2020, while emerging-market economies will contract 2.5%, their first slump since aggregate data became available in 1960.

Gold jumped 1.2% on Tuesday, as investors adopted a more cautious stance ahead of the Fed's policy meeting. U.S. gold futures settled up 1% at $1,721.90 an ounce.

Latin American stocks and currencies were down on Tuesday as investors cashed in after a recent rally. Regional currencies weakened ahead of the Fed meeting.

The declines weighed on the broader emerging markets shares benchmark, which was up 0.2%. The broader Latin American shares benchmark was down 0.85%.

Oil prices slipped nearly 1% after Brent had hit its highest in more than three months at $41 a barrel.

Brent oil futures rose 38 cents to settle at $41.18 a barrel, while U.S. crude settled up 75 cents at $38.94.

(Reporting by Pete Schroeder in Washington and Herbert Lash in New York; additional reporting by Devik Jain in Bengalaru; Editing by Bernadette Baum, Alistair Bell and Jonathan Oatis)