Updated from 4:07 p.m. EDT

Stocks trimmed sizable gains Friday to end mixed, as investors took some money off the table after a big run-up.

The Dow Jones Industrial Average closed up 21 points, or 0.2%, at 9063, while the Nasdaq was down 19 points, or 1%, at 1627. The S&P 500 fell 2 points, or 0.2%, at 988.

The Dow had been up as much as 174 points earlier while the Nasdaq had been up 38 points, as investors reacted favorably to a better-than-expected employment report, upbeat news from Intel ( INTC) and a big merger announcement in the software space.

"All the news today was positive, but the backdrop to that news was that the S&P 500 had rallied five days in a row and that the advancers had beaten decliners 12 days in a row," said Brian Pears, head of equity trading at Victory Capital Management. "This is a relatively rational reaction to some incredible strength that we've had."

Barry Berman, head of Nasdaq trading at Robert W. Baird & Co., agreed that "profit taking" was probably responsible for the pull back. "The S&P got to 1000, which may be a psychological goal for people," he said.

The last time the S&P 500 hit 1000 was June 28, 2002. The index hasn't closed above that level since June 20 of last year. Berman said the next hurdle for the market will be second-quarter preannouncements. "Guidance that you get now will be for the second half of the year, and the market's been moving up in anticipation of things picking up in the second half," he said.

Over in the bond market, the 10-year Treasury note was flat, with its yield at 3.34%. The dollar strengthened against the yen and euro on the better-than-expected labor market report.

Stocks had rallied fiercely earlier in the day thanks in part to a midquarter update from Intel. The semiconductor firm narrowed the range of its likely second-quarter performance and left the midpoint of its previous revenue forecast unchanged at $6.7 billion. Analysts were expecting the midpoint to be lowered. Still, Intel finished with a loss of 0.4%, or 8 cents, at $21.76.

Software stocks were higher, however, after Oracle ( ORCL) said it has offered $5.1 billion, or $16 a share, for PeopleSoft ( PSFT). The offer comes just days after PeopleSoft agreed to merge with J.D. Edwards ( JDEC). Shares of PeopleSoft were up 18%, or $2.71, at $17.82, while J.D. Edwards was up 3%, or 41 cents, at $13.20. Siebel Systems ( SEBL) was up 2%, or 19 cents, at $10.98.

On a separate note, Oracle raised its fiscal fourth-quarter earnings outlook slightly to a range between 14 cents and 15 cents a share. Analysts surveyed by Thomson First Call had predicted a profit of 14 cents. Oracle shares were down 2%, or 28 cents, at $13.08.

In the hardware segment, Sun Microsystems ( SUNW) gained 5%, or 28 cents, at $5.20 as investors speculated about the next big merger.

The latest employment report gave investors a reason to cheer earlier. Although unemployment in the U.S. continued to rise in May and reached its highest level in nine years, the economy shed fewer jobs than had been projected and payroll data for April were revised to show that no jobs were lost. April payrolls initially showed a decline of 48,000 jobs.

The jobless rate rose slightly to 6.1%, in line with market forecasts, from 6% in April. Some 17,000 jobs were shed last month, below the expectation for 30,000 jobs to be lost.

"If we haven't turned the corner, it seems like we're rounding the bend," said Bill Cheney, chief economist at John Hancock Financial Services. "Despite an uptick in the unemployment rate, the employment picture is slowly improving."

In the biotech space, ImClone Systems ( IMCLE) erased a large gain to end down 0.4%, or 14 cents, at $38.39. The biotechnology company said it will resubmit the application for its cancer drug Erbitux in the second half of the year.

On the Dow, McDonald's ( MCD) was the biggest percentage gainer after Mike Roberts, president of McDonald's USA, said the fast food chain is having an "encouraging" reversal of its year-long slump in sales. Shares were up 9%, or $1.78, at $21.06.

On the research front, J.P. Morgan said it is adding insurer Chubb ( CB) to its Focus List, although the firm is keeping the stock's underweight rating. Chubb was down 1.8%, or $1.09, at $59.80.

Tyco ( TYC) shareholders sued Merrill Lynch ( MER) and one of its former analysts on claims of securities fraud. Merrill was up 0.5%, or 22 cents, at $46.39.

Overseas markets were up, with London's FTSE 100 up 1% at 4150 and Germany's Xetra DAX up 2.9% at 3127. In Asia, Japan's Nikkei closed 1.5% higher at 8785, while Hong Kong's Hang Seng gained 0.6% to 9694.

Nymex crude oil prices were up 54 cents at $31.28. On Thursday, the Dow gained 2 points to 9041. The S&P 500 tacked on 4 points to 990, while the Nasdaq rose 11 points to 1646.

More from Markets

Oil Prices, China Tariffs, Micron and Kohl's - 5 Things You Must Know

Oil Prices, China Tariffs, Micron and Kohl's - 5 Things You Must Know

China Slashes Auto Import Tariffs as Trump's Trade Push Gets Big Early Win

China Slashes Auto Import Tariffs as Trump's Trade Push Gets Big Early Win

Global Stocks Push Higher as China Tariff Move, Softer US Dollar Boost Sentiment

Global Stocks Push Higher as China Tariff Move, Softer US Dollar Boost Sentiment

U.S. Crude Oil Hits Fresh 3-Year Highs as Gas Prices March to $3 a Gallon

U.S. Crude Oil Hits Fresh 3-Year Highs as Gas Prices March to $3 a Gallon

Video: When Planning for Retirement, Don't Underestimate Your Life Span

Video: When Planning for Retirement, Don't Underestimate Your Life Span