Updated

Stocks rose Thursday as the latest gross domestic product data suggested the U.S. economy was buoyant but not expanding too fast.

The Dow Jones industrial average (search) gained 79.80 points, or 0.76 percent, to end at 10,537.60. The Standard & Poor's 500 Index (search) gained 7.61 points, or 0.64 percent, to close at 1,197.62. The technology-laced Nasdaq Composite Index (search) gained 21.12 points, or 1.03 percent, to 2,071.24.

The Nasdaq resumed its climb, after Wednesday's dip, to end near its three-month high. The Dow Jones industrial average closed at its highest level in almost two months.

The economy grew by an encouraging 3.5 percent in the first quarter of the year — up from a 3.1 percent estimate last month but slightly less than the 3.6 percent economists had expected. Investors welcomed the report as a sign that the economy was still growing and inflation risks had lessened.

The news also helped minimize this week's rise in oil prices, given that energy costs had not dampened first-quarter GDP to a great degree. A barrel of light crude settled at $51.01, up 3 cents, on the New York Mercantile Exchange (search).

"Oil's going to be slipping and sliding around, but the fact remains it fell nearly $10 from its highs," said Bryan Piskorowski, market analyst at Wachovia Securities. "It's injecting a little caution into the market, but otherwise the GDP number didn't make any waves, kind of in line with what we expected, and we're getting a bounce off it."

Home builder stocks performed well after Toll Brothers Inc. (TOL) raised its profit forecast for the year. Caterpillar Inc. helped lead the Dow higher, the day after Chief Executive Officer Jim Owens called U.S. business confidence "very strong" at the Reuters Manufacturing Summit.

Tech shares also rose as investors looked ahead to second-half sales of new products. Intel Corp. and Apple Computer Inc. posted gains.

Owen Fitzpatrick, head of the U.S. equity group at Deutsche Bank Private Wealth Management, of New York, said of the tech interest: "Valuation levels are reasonable, and we're seeing some signs that things have stabilized, in terms of improved order growth and inventories coming down."

Shares of Dow industrial companies, which are sensitive to the economy's fortunes, rose. United Technologies Corp. (UTX), an aerospace and building systems maker, was up 0.6 percent at $107.43 and Caterpillar Inc. (CAT) rose 0.7 percent at $93.11.

Bonds edged higher after the previous session's sell-off. The yield on the 10-year Treasury note fell to 4.08 percent from 4.09 percent late Wednesday. The dollar rose to a new 2005 high against the euro as pessimism over the new European constitution weighed on the 12-nation currency, and the dollar rose against most other currencies as well. Gold prices fell.

Analysts said the GDP report could keep the market from suffering another slump, as it did in April when the Dow nearly fell through 10,000. The economy appears to have achieved a balance between economic growth and inflation that makes it likely the Federal Reserve will continue with its plan to raise interest rates gradually.

"The economy turning in good growth, inflation is moderate — that's a very favorable economic backdrop for the financial markets," said Richard Rippe, chief economist for the Prudential Equity Group. "The Fed isn't quite finished raising rates, but there's nothing in these numbers that say they should get more aggressive in that process."

Among tech shares, Apple (AAPL), which makes the Macintosh personal computer and the iPod digital music player, was up 2.4 percent, or 96 cents, at $40.74. Intel (INTC), the world's largest computer chip maker, climbed 1.4 percent, or 37 cents, to $27.37 on Nasdaq.

Embattled Dow component General Motors Corp. (GM) rose 46 cents to $31.95 after a media report said the company was considering a spinoff or sale of its residential mortgage business that could bring in up to $10 billion. GM called the move speculation.

Investors worried about consumer spending — more than two-thirds of the nation's economic activity — were pleased with the quarterly results from Costco Wholesale Corp. (COST).The bulk discounter reported a 6 percent rise in profits, beating Wall Street forecasts by a penny per share. Costco was up 50 cents at $45.92.

Luxury home builder Toll Brothers (TOL) climbed $3.17 to $88.90 after it reported a sharp jump in second quarter earnings that surpassed analysts' expectations by 22 cents per share. The company also boosted its forecasts for its full-year results.

Boeing Co. (BA) rose 1.2 percent to $62.20 after Indonesian budget carrier Lion Air said it will buy 60 aircraft from Boeing in a $3.9 billion deal.

Rising pork and beef costs ate into Hormel Foods Corp.'s (HRL) quarterly earnings. The maker of Spam reported a modest 4 percent rise in profits after one-time charges, missing Wall Street's profit forecasts by 2 cents per share. Hormel tumbled 8.2 percent, or $2.67, to $30.08.

About 1.29 billion shares changed hands on the New York Stock Exchange, just below the 1.46 billion daily average for last year. About 1.64 billion shares were traded on Nasdaq, below the 1.81 billion daily average last year.

Gaining stocks outnumbered decliners by almost 24 to 9 on the New York Stock Exchange and by 7 to 3 on Nasdaq.

The Russell 2000 index of smaller companies was up 8.30, or 1.37 percent, at 614.70.

Overseas, Japan's Nikkei stock average rose 0.12 percent. In Europe, Britain's FTSE 100 was up 0.47 percent, France's CAC-40 climbed 0.9 percent for the session, and Germany's DAX index gained 1.07 percent.

Reuters and the Associated Press contributed to this report.