NEW YORK – Stocks reversed an early rise on Wall Street on Monday as traders returned to worrying about the European economy.

Optimism about a deal to prevent financial collapse in Cyprus had briefly pushed the Standard & Poor’s 500 index to within a quarter-point of its record closing high, but stocks soon turned negative.

The S&P 500 and Nasdaq composite index both closed down 0.3 percent. The Dow Jones industrial average slipped 0.4 percent.

The initial euphoria about Cyprus’ deal to secure 10 billion euros in emergency funding was overshadowed by renewed concerns about the European economy.

The fear intensified after a top European official indicated that investors in struggling banks may be forced to take losses — an element of the Cyprus agreement that had previously been seen as unique to that country.

All 10 industry groups in the S&P 500 closed lower. Network technology company VMware Inc. dove after the website Business Insider reported that PayPal and eBay will remove its software from 80,000 servers. The stock fell $3.65, or 4.6 percent, to $76.50.

Among the biggest drags on the S&P 500 index were software maker Red Hat Inc., online marketplace eBay Inc. and Textron Inc., an aerospace and defense contractor.