"People are finally settling down, becoming a little calmer about the outlook" for stocks, said Chuck Lieberman, the chief investment officer at Advisors Capital Management. .
After erasing early losses, the Dow Jones Industrial Average climbed 85.73 points to 12,848.95, with 23 of its 30 components ending in positive territory.
American International Group Inc. rose 7.1%, drawing support as property and casualty insurer Travelers Cos. lifted its profit forecast for the year. .
Late Wednesday, medical insurer Aflac Inc. reported a 14% rise in net income, and boosted its 2008 outlook.
Other blue-chip gains included General Motors Corp. , up 5.6%, following news of a surprise profit at Ford Motor Co. .
Crude-oil prices fell back from record levels near $120 a barrel to below $117, with the front contract losing $2.24 to settle at $116.06 a barrel.
Elsewhere on the NYSE, gold futures ended sharply lower, as the rallying U.S. dollar and falling oil prices put heavy selling pressure on the precious metal. Gold for June delivery dropped $19.60 to end at $889.40 an ounce. .
The broad S&P 500 index rose 8.89 points to 1,388.82, while the Nasdaq Composite climbed 23.71 points to 2,428.92.
After the closing bell, Microsoft Corp. will report results.
One major M&A transaction had Wendy's International Inc. and Triarc Companies Inc. agreeing to join in a $2.3 billion deal.
Volume on the New York Stock Exchange neared 4.4 billion shares, and advancing issues outpaced those on the decline 3 to 2. On the Nasdaq, 2.3 billion shares traded hands, and advancing stocks ran ahead of those declining 9 to 5.
Dollar strength was especially pronounced against the euro, which fell sharply after a closely watched German business climate poll fell more than economists had forecast.
First-time claims for state unemployment benefits fell 33,000 to 342,000, its lowest level in two months in the latest week, the Labor Department reported.
And orders for U.S.-built durable goods fell 0.3% in March, the third decline in a row, the Commerce Department estimated. But the decline was as expected by economists following an upwardly revised 0.9% decline in February.
Sales of new homes plunged by 8.5% to a 17-year low in March, the Commerce Department estimated. The decline in new-home sales to a seasonally adjusted annual rate of 526,000 was much weaker than the 577,000 pace expected by economists surveyed by MarketWatch.
Overseas, European shares pulled back from earlier lows to finish flat. .
In Asia, Chinese stocks soared while the rest of the region ended mixed. .
U.S. stocks ended higher on Wednesday, with better-than-forecast results from Boeing Co. helping steer stocks up in a choppy session.
By Nick Godt