Oversold tech shares led Wall Street higher Thursday as investors brushed off high oil prices and brokerage downgrades of General Motors and focused on strong earnings.

Stocks were flat to moderately higher through much of the session, but few analysts believed there was much conviction in the day's buying. The equity markets have traded in a narrow band for more than a month amid growing nervousness about slower second-half growth and the potential for terror attacks ahead of the presidential election and the Olympics.

The Dow Jones industrial average rose 12.17, or 0.1 percent, to 10,129.24. The Nasdaq composite index gained 22.80, or 1.2 percent, to 1881.06. The Standard & Poor's 500-stock index gained 5.01, or 0.5 percent, to 1100.43.

In economic news, the Labor Department reported a moderate 0.9 percent rise in wages and benefits for U.S. workers in the April-June quarter, down slightly from the previous quarter's increase. In a second report, the department said new claims for unemployment benefits edged up last week, though they remain at a level that suggests continued labor market improvement.

Climbing crude prices added to the market's uneasiness. Down substantially earlier in the session, September crude futures settled only 15 cents lower at $42.75 on the New York Mercantile Exchange. A dispute between Russian oil giant Yukos and Moscow briefly pushed oil prices past $43 a barrel on Wednesday, a 21-year high.

General Motors fell $1.37, or 3.1 percent, to $42.75, after analysts with Goldman Sachs and Lehman Brothers downgraded their ratings of the stock, amid worries about inventory buildup and a pending accounting rule change that could dent earnings.

MetLife gained $1.23, to $35.53, after reporting a 45 percent gain in second-quarter profit, soaring past Wall Street forecasts, as higher premiums and profitable investments helped boost revenue across all business segments. The company also disclosed that the Internal Revenue Service is auditing its returns for the years 1997-99.

Exxon Mobil rose 22 cents, to $46.03, after matching Wall Street's earnings estimates, reporting a 39 percent jump in profit on higher prices for oil and natural gas.

Krispy Kreme Doughnuts fell $2.95, or 15.8 percent, to $15.71, after disclosing it is the subject of an "informal, nonpublic inquiry" by the Securities and Exchange Commission. The probe is focused on the company's franchise reacquisitions and its guidance on a reduction in earnings, Krispy Kreme said.

Other Indicators

* The New York Stock Exchange composite index rose 36.30, to 6394.07; the American Stock Exchange index rose 2.99, to 1229.60; and the Russell 2000 index of smaller-company stocks rose 8.63, to 549.83.

* Advancing issues outnumbered declining ones by 5 to 2 on the NYSE, where trading volume fell to 1.52 billion shares, from 1.54 billion on Wednesday. On the Nasdaq Stock Market, advancers outnumbered decliners by 26 to 1 and volume totaled 1.69 billion, down from 1.82 billion.

* The price of the Treasury's 10-year note rose 94 cents per $1,000 invested, and its yield fell to 4.58 percent, from 4.59 percent on Wednesday.

* The dollar rose against the Japanese yen and the euro. In late New York trading, a dollar bought 112.10 yen, up from 111.67 late Wednesday, and a euro bought $1.2035, down from $1.2058.

* Light, sweet crude oil for September delivery settled at $42.75, down 15 cents, on the New York Mercantile Exchange.

* Gold for current delivery fell to $387.00 a troy ounce, from $389.00 on Wednesday, on the New York Mercantile Exchange's Commodity Exchange.