Updated from 4:10 p.m. EDT

Stocks erased most of an early swoon Thursday and closed narrowly mixed as traders decided to square up positions a day ahead of the monthly employment report.

The

Dow Jones Industrial Average

, which was as many as 65 points lower early in the session, ended down 23.05 points, or 0.21%, at 11,216.50. The

S&P 500

closed down 2.52 points, or 0.19%, to 1309.04. The

Nasdaq Composite

gained 1.42 points, or 0.06%, to 2361.17, rallying back from an 11-point loss.

"We finished almost where we began, and that's due to the weight of tomorrow's jobs numbers," said Art Hogan, chief market analyst with Jefferies. "It will arguably be the most important economic item of the month. We're near the upper end of our trading range, and we've faced a lot of headwinds pretty well. If the jobs number tomorrow is outside of an acceptable range, however, then we're in trouble."

Barry Hyman, equity market strategist with Ehrenkrantz King Nussbaum, agreed that the "bias still seems to be to the upside. Buyers are optimistic and see the long-term side of the market. The downward pressure now is not that great. The money flow has just been too strong."

About 1.57 billion shares traded on the

New York Stock Exchange

, with decliners beating advancers by a 4-to-3 margin. Trading volume on the Nasdaq was 2.18 billion shares, with decliners outpacing advancers 8 to 7.

Helping the Dow's recovery was

3M

(MMM) - Get Report

, which increased sales and earnings guidance thanks to strength in several product categories. Shares of the old Minnesota Mining & Manufacturing gained 5.1% to close at $81.38.

Energy prices continued to trend higher after the government reported a steep decline in gasoline inventories Wednesday morning. In Nymex floor trading, May crude finished up 87 cents to $67.94 a barrel, while gasoline futures added 5 cents to $2 a gallon.

The 10-year Treasury bond was off 11/32 in price to yield 4.89%, and the dollar rose against the yen and euro.

The government said Thursday that first-time jobless claims fell by 5,000 last week to 299,000, below economists expectations. The number could bode well for Friday's employment report, which is currently expected to show that 190,000 nonfarm jobs were added to U.S. payrolls last month.

"Everyone is setting up for tomorrow's employment reports," said Paul Mendelsohn, chief investment strategist with Windham Financial. "It's a big mover of all markets, so people don't want to be caught on the wrong side. People want to go in neutral. We'll see this position squaring across the board ahead of that number."

Merck finished down 3.2% after a jury in New Jersey awarded $4.5 million in damages to a man who claimed Vioxx caused his heart attack. Another man's claims were rejected. The verdict is the first in litigation in which plaintiffs took Vioxx for more than 18 months, the period after which Merck has acknowledged safety issues. The stock lost $1.15 to $34.84.

U.S. retailers are reporting results for March, with

Wal-Mart

(WMT) - Get Report

saying same-store sales rose a paltry 1.4%. The world's largest retailer also expects April same-store sales growth in a range of 4% to 6%. Wal-Mart gave up 31 cents, or 0.7%, at $46.56.

Meanwhile,

Target

(TGT) - Get Report

posted a 2.2% increase in March, beating estimates of a 2.1% increase. The stock finished up 44 cents, or 0.8%, to $52.62.

To view Gregg Greenberg's video take on today's market, click here

.

Precious metals hit new multiyear highs, and gold at one point advanced past the $600 level. Gold futures touched a high of $601.90 and finished up $7.20 to $599.70 an ounce, a new 25-year high. Silver rose 34 cents to $12.04 an ounce , a new 22-year high.

U.S. stocks had a second solid session on Wednesday, as

Apple's

(AAPL) - Get Report

10% jump paced the tech sector. Since Monday, the Dow is up 0.8%, the S&P 500 is up 1.1%, and the Nasdaq is up 1%. Apple was up another 6% to $71.24 on Thursday.

"Despite yesterday's broad advance, trader sentiment remains sober," said Ken Tower, chief market strategist with CyberTrader.

In other retail news,

Gap

(GPS) - Get Report

posted a 13% decline in March same-store sales, while

Sharper Image

(SHRP)

said same-store sales tumbled 29% for the month.

Teen retailers

Hot Topic

(HOTT)

and

Aeropostale

(ARO)

also reported lower same-store sales late Wednesday.

Elsewhere,

Wet Seal

(WTSLA)

posted an increase of 16.2%,

Chico's FAS

(CHS) - Get Report

reported an 8.4% rise, and

Bebe Stores

(BEBE)

had a 4.1% gain for the month of March.

Despite the disappointing sales results, the S&P Retail index rose 0.3%. Elsewhere, the Amex Airlines index lost 1.9%, the Amex Gold Bugs index finished up 1.9%, and the Philadelphia Semiconductor Sector index gained 1.3%.

In earnings,

Bed Bath & Beyond

(BBBY) - Get Report

said fourth-quarter earnings rose 9% from a year ago to $197.9 million, or 67 cents a share, beating estimates by 2 cents. Sales of $1.69 billion were also stronger than expected. Shares gained $2.50, or 6.5%, to $40.82.

Pier 1

(PIR) - Get Report

swung to a fourth-quarter loss of $10 million, or 11 cents a share, compared with a profit of $18.8 million, or 21 cents a share, last year. Total sales rose just 0.7% to $506 million as same-store sales declined 2.9%. The Thomson First Call consensus was for EPS of a penny on sales of $535 million. The stock tacked on 71 cents, or 6%, to close at $12.58, reversing an earlier loss of 4%.

Security software provider

Websense

(WBSN)

guided first-quarter sales lower Wednesday. The company expects to post $42.3 million to $42.5 million on the top line; analysts were looking for $43.1 million. Websense fell $1.49, or 5.3%, to $26.57.

Research In Motion

(RIMM)

reported fourth-quarter results after the bell Thursday. The company said it had a profit of $18.4 million, or 10 cents a share, compared with a loss of $2.6 million, or a penny a share, a year ago. Excluding items, RIM earned 65 cents a share, 2 cents below the Thomson First Call consensus. Shares of RIM lost $1.03, or 1.2%, to $84.53 and were down another 6% in the after-hours session.

Online music store

Napster

(NAPS)

said it now expects fourth-quarter revenue of more than $26 million, thanks to robust subscriber growth. The consensus estimate was about $25 million. Napster surged 68 cents, or 20.2%, to $4.05.

In early research, Bank of America lowered

Warner Music

(WMG) - Get Report

to neutral from buy, citing a 40%-plus run-up in the shares since the end of October. The stock was lower by 22 cents, or 1%, to end the session at $22.27.

Overseas markets were mostly higher, with London's FTSE 100 fractionally higher at 6046 and Germany's Xetra DAX unchanged at 6031. In Asia, Japan's Nikkei rose 1.4% overnight to 17,489, while Hong Kong's Hang Seng added 1.9% to 16,411.