Another sharp drop in oil prices helped Wall Street overcome profit-taking and extend its rally to a third straight session Thursday. The major indexes posted modest gains in a heavily-traded session.

Concern over China's decision to raise its benchmark interest rate for the first time in nine years pressured materials and energy stocks, as investors worried about slower demand from the world's fastest-growing economy. However, the move also encouraged selling in oil.

Oil prices continued Wednesday's sharp retreat and coaxed stock buyers back into the market in afternoon trading.

"Certainly, there's still a good amount of risk appetite in the market," said Chris Wolfe, global head of equities for J.P. Morgan Private Bank. "You're seeing people come back in despite the pressures, and as far as earnings go, so far so good."

After profit-taking kept the major indexes down through the morning, the Dow Jones industrial average ended up 2.51, or 0.03 percent, to 10,004.54. The Standard & Poor's 500-stock index was up 2.04, or 0.18 percent, at 1,127.44, and the Nasdaq composite index gained 5.75, or 0.29 percent, to 1,975.74. The major indexes posted their first three-day stretch of gains since Sept. 10-14.

Unemployment questions weighed on some investors, as the Labor Department reported a sharp rise in first-time jobless claims last week.

Companies reporting earnings got a mixed reception Thursday, despite generally good numbers, as investors looked more at fourth-quarter forecasts than current results.

Having enjoyed the sharp climb in oil prices through the third quarter, Dow component ExxonMobil posted record profits but nonetheless lost 34 cents, to $48.61.

Verizon Communications slipped 2 cents, to $39.38, after it, too, beat estimates.

Aetna reported a nearly 500 percent increase in third-quarter profits, which beat Wall Street estimates by 11 cents per share. The company also brightened its outlook for future profits. Aetna surged $3.55, to $95.30.

Although Viacom swung to a loss in the third quarter due to a $1.5 billion charge for the spinoff of its Blockbuster video rental chain, the company gained $1.15, to $36.50.

Defense company Raytheon was up 79 cents at $37.45 after it swung to a profit.

Alcoa Inc. was one of the hardest-hit stocks as investors worried about demand for metals in China due to its interest rate hike. The Dow component sank 96 cents, to $32.41.

Other Indicators

* The New York Stock Exchange composite index rose 4.63, to 6670.50; the American Stock Exchange index fell 7.24, to 1307.60; and the Russell 2000 index of smaller-company stocks fell 1.55, to 585.63.

* Advancing issues narrowly outnumbered declining ones on the NYSE and the Nasdaq Stock Market. NYSE trading volume fell to 1.63 billion shares, from 1.74 billion on Wednesday, and Nasdaq volume totaled 1.8 billion, down from 2.06 billion.

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

* The dollar fell against the Japanese yen and the euro. In late New York trading, a dollar bought 106.21 yen, down from 106.51 late Wednesday, and a euro bought $1.2745, up from $1.2705.

* Light, sweet crude oil for December delivery settled at $50.92, down $1.54, on the New York Mercantile Exchange.

* Gold for current delivery rose to $425.10 a troy ounce, from $424.80 on Wednesday, on the New York Mercantile Exchange's Commodity Exchange.