By Anora Mahmudova, MarketWatch

NEW YORK (MarketWatch) -- The U.S. stock market ended Monday generally higher, with the S&P 500 and Dow Jones Industrial Average closing at record levels.

The main benchmarks moved lower in early trade, after the ISM reported erroneous data showing a downbeat reading in the manufacturing index. Stocks regained footing in the afternoon, once correct data on manufacturing showed factories grew at the fastest pace this year.

Marginal gains on the S&P 500 helped the benchmark close at a record level for the 15th time while the Dow closed at a record for the sixth time this year.

The S&P 500 (SPX) closed 1.40 points, or 0.1%, higher at 1,924.97. The Dow Jones Industrial Average (DJI) added 26.46 points, or 0.2%, to 16,743.63. The Nasdaq Composite (RIXF) ended the day down 5.42 points, or 0.1%, at 4,237.20.

Read the recap of MarketWatch's live blog of today's stock-market action.

"The correct headline suggests that the economy continues to heal from the first quarter slump. In particular, the new orders component is encouraging," said Quincy Krosby, market strategist at Prudential Financial.

"The economy is improving, but not as fast as investors hoped for," Chris Gaffney, senior market strategist at EverBank Wealth Management.

"We expect the market to keep grinding higher. However, with volatility at low levels, there is a fear among investors and everyone is waiting for that big 'black swan' event," he added.

American manufacturers grew in May at the fastest rate of 2014, as almost every major sector showed improvement, according to a index that was corrected Monday. The ISM revised its main gauge of manufacturing activity to 55.4 in May from April's 54.9, according to press reports.

The first incorrect report showed that U.S. factories slowed their pace of expansion to 53.2 in May, sending stocks lower and prompting some economists to question the numbers. Read: ISM and the parade of wrong numbers.

Separately, the final Markit reading of U.S. manufacturing conditions in May totaled 56.4, compared to a preliminary reading of 56.2, the privately run firm said Monday. In April the index registered 55.4.

Deal news sends Broadcom, Protective Life soaring

In corporate news, Broadcom Corp. (BRCM) shares surged 9.9% after the company said Monday it hired J.P. Morgan to explore options for its cellular baseband business, including a possible sale or wind-down of the business.

Shares of American Realty Capital Healthcare Trust Inc. (HCT) rallied 9.7% on news that Ventas Inc. (VTR) has agreed to buy the company in a $2.6 billion deal. Shares in Ventas fell 2.9%.

Shares of Apple Inc. (AAPL) fell 1.5% as investors were less impressed with the company's new iOS8 released at the WWDC than the developers.

Shares of Protective Life Corp. (PL) soared 12% after Dai-ichi Life Insurance Co. said it is considering buying a life insurer, in response to a Wall Street Journal report that it is mulling a $4.87 deal to buy Protective Life.

Shares of Allergan Inc. (AGN) were up 2.8%, after Valeant Pharmaceuticals International Inc. (VRX) late Friday raised its bid again for the Botox maker to $55 billion from $49.4 billion.

Shares of Conn's Inc. (CONN) jumped 6.9% after the retailer beat analysts' first-quarter profit and sales estimates.

After the market closed Monday, Krispy Kreme (KKD) shares dropped nearly 10% after revenue missed Wall Street's forecast of $125.4 million, according to consensus estimates from FactSet.

Quiksilver Inc. (ZQK) shares tumbled 25% after the company reported a larger-than-expected fiscal second-quarter loss.

Asian, European stocks rise

Asia stocks rose on Monday, with the Nikkei 225 index surging 2.1%. China's latest official PMI index, which rose to a five-month high, helped boost Asian markets.

The strong Chinese data also helped European stocks, with gains for the Stoxx Europe 600 driven by natural-resource firms.

In other markets, gold futures for August (GCQ4) settled lower for a sixth straight session. Crude oil for July delivery (CLN4) fell to mark their lowest close in nearly two weeks.

More must-reads from MarketWatch:

Yields falling? These REITs' dividends pay up to 19%

Fixed-income market has permanently shrunk

Why Apple's plan to livestream WWDC is a big deal

Subscribe to WSJ: http://online.wsj.com?mod=djnwires