The Dow ended lower and the Nasdaq and S&P near unchanged levels Thursday after Standard & Poor's cut the debt ratings for General Motors Corp. (GM) and Ford Motor Co. (F) to junk status.

The Dow Jones industrial average (search) lost 44.26 points, or 0.43 percent, to end at 10,340.38. The technology-laced Nasdaq Composite Index (search) was down 0.43 points, or 0.02 percent, to end at 1,961.80, while the broader Standard & Poor's 500 (search) index shed 3.02 points, or 0.26 percent, to end at 1,172.63.

Stocks in all three major indexes had been trading near unchanged levels during the first half of the session but the Dow began to fall after the S&P cut the debt ratings of the two major U.S. automakers.

"Anyone who is surprised by the debt downgrade of GM and Ford doesn't have a pulse," said Al Goldman, chief market strategist at A.G. Edwards. "As sure as Mom's apple pie is tasty, this was going to happen."

The move reduces the automakers' avenues for raising funds as they struggle with global competition and rising healthcare costs. In making the decision, the S&P said GM's management strategy may not be able to cope with its competitive disadvantage and Ford SUVs "will no longer be as profitable as they have been in recent years."

Shares of General Motors extended their losses, falling 6 percent, or $1.94, to $30.86. Ford fell 4.53 percent, or 46 cents to $9.70.

"It's always a little bit of a shock when reality strikes," Goldman said. "Obviously, it could increase the borrowing costs of GM and Ford. But it won't affect the economy."

The bond market moved sharply higher as the automakers' debt downgrades sent investors looking for safer government issues. The yield on the 10-year Treasury note fell to 4.15 percent from 4.19 percent late Wednesday. The dollar was lower against most major currencies, while gold prices rose.

Wall Street was also looking ahead to Friday's widely watched report on job creation, which is expected to show non-farm payrolls rose 170,000 in April.

Before the opening bell, drugmaker Merck & Co. Inc. (MRK), which is struggling to rebound from the withdrawal of its arthritis drug Vioxx (search), said Chief Executive Raymond Gilmartin has resigned and will be replaced by Richard T. Clark, president of its manufacturing division. Gilmartin was criticized for his handling of Vioxx, which was pulled from the market last year due to health risks. Merck shares dropped 18 cents to $34.75.

In economic news, U.S. business productivity growth accelerated unexpectedly in the first quarter but labor costs picked up, according to a government report on Thursday that suggested a slight increase in profit and price pressures.

Also, the number of Americans filing new claims for unemployment aid rose a larger-than-expected 11,000 last week but stayed in a range consistent with job growth, a government report showed on Thursday.

Retailers' sales reports showed gains at traditional department stores and wholesale clubs, but slower growth at big discount chains — a sign that lower-income Americans might be spending less due to higher gasoline prices.

Traditional department stores fared well in April's retail sales reports, but big discount chains had lower-than-expected sales. Wal-Mart Stores Inc. (WMT) rose 12 cents to $48.57 and Target Corp. (TGT) gained $1 to $47.28 although their sales were below Wall Street expectations. Federated Department Stores Inc. (FD) surged $2.20 to $62.37 and J.C. Penney Co. Inc. (JCP) added 37 cents to $48.12 as both stores' April sales far surpassed analysts expectations.

Helping the Nasdaq limit its losses was Starbucks Corp. (SBUX), up 3 percent, or $1.63 at $52.24 a day after it said same-store sales in April exceeded analysts' expectations.

In other corporate news, IBM Corp. (IBM) announced a restructuring that will result in up to 30,000 lost jobs, mostly in Europe, though some U.S. layoffs are expected. The restructuring comes after a disappointing first quarter for IBM, which has been plagued by dropping revenues in Europe. IBM was down $1.58 at $75.50.

Gillette Co. (G) fell 43 cents to $52.42 after the consumer products manufacturer said earnings rose 19 percent in the first quarter and beat Wall Street forecasts by 2 cents per share. The company said earnings growth was slowed by a factory closure and costs associated with its planned merger with Procter & Gamble Co. P&G (PG) shed 36 cents to $54.78.

Crude oil futures moved sharply higher in afternoon trading after an industry consulting firm issued a report that projected higher energy prices. A barrel of light crude settled at $50.83, up 70 cents, on the New York Mercantile Exchange (search).

Exxon Mobil Corp. (XOM) rose 52 cents, or almost 1 percent, to $57.75 and ConocoPhillips (COP) gained 96 cents, or about 1 percent, to $105.01. Exxon Mobil was the Dow's biggest percentage gainer.

Trading was active, with 1.61 billion shares changing hands on the New York Stock Exchange, above the 1.46 billion daily average for last year. About 1.79 billion shares were traded on Nasdaq, just below the 1.81 billion daily average last year.

Advancers outnumbered decliners on the New York Stock Exchange by about 9 to 8 and by about 8 to 7 on Nasdaq.

The Russell 2000 index of smaller companies was up 0.42, or 0.1 percent, at 595.64.

Overseas, Japan's markets were closed for a national holiday. In Europe, Britain's FTSE 100 closed up 0.41 percent, France's CAC-40 gained 0.8 percent for the session, and Germany's DAX index rose 0.82 percent in late trading.

Reuters and The Associated Press contributed to this report.