Updated

Stocks rose Thursday, boosted by a positive view of the economy from Federal Reserve Chairman Alan Greenspan, while technology shares rallied in anticipation of good results from Intel Corp.'s (INTC) business update.

The Dow Jones industrial average (search) was up 26.16 points, or 0.25 percent, to end at 10,503.02 and the Standard & Poor's 500 Index (search) was up 6.26 points, or 0.52 percent, to finish at 1,200.93. The Nasdaq Composite Index (search) was up 16.73 points, or 0.81 percent, to close at 2,076.91.

Semiconductor shares gained ahead of Intel's mid-quarter outlook, with the No. 1 chipmaker's stock up 2.2 percent at $27.70. Altera Corp. (ALTR) was up 1.7 percent at $22.13 and Applied Materials Inc. (AMAT) was up 3 percent at $17.40.

After the closing bell, Intel (INTC) said its sees second-quarter revenue at the high end of its expectations and raised its gross margin forecast, as many investors hs shares fell nearly 1 percent to $27.45 on the Inet electronic brokerage system.

Investors took comfort from Greenspan's testimony before a congressional committee, where he noted that the U.S. economy was on "reasonably firm footing." He also said the central bank should be able to keep raising interest rates at a "measured" pace.

"For the moment, the market is worrying about whether economic growth is too slow, and Greenspan told us that the risk of the economy falling off a cliff is fairly low," Anthony Chan, senior economist, J.P. Morgan Asset Management, said. "You got a relief reaction."

Oil prices rallied, recovering from the previous day's deep losses when a rise in U.S. fuel inventories calmed fears of a possible winter supply crunch. U.S. light sweet crude ended up $1.74 at $54.28 a barrel. While oil prices are generally considered bad for stocks as they hurt corporate profits and consumer spending, they boost oil company shares.

Exxon Mobil Corp. (XOM) , the world's largest publicly traded oil company, was up 2 percent at $57.93 and ranked among the Dow's biggest percentage gainers. Chevron Corp. (CVX) was up 1.6 percent at $55.68, and ConocoPhillips (COP) up 1.5 percent at $55.31.

"Oil prices are up and that is helping oil companies. Rates are going to go up, but Greenspan also said that the economy is on a solid footing, which is a calming factor," said Martin Yokosawa, senior portfolio manager at Oberweis Asset Management.

Greenspan's remarks had some analysts speculating that the Fed would likely continue raising short-term rates through the third quarter, perhaps to the 4 percent level. With the rate cycle's end in sight, stock investors can look forward to more stability, said Hans F. Olsen, chief investment officer at Bingham Legg Advisers, a private wealth management firm in Boston.

"You can start to see the end is near ... The interest rate increase regime is coming to a close, and that is an unambiguous positive development for equities," Olsen said. "For the balance of the year, I think that sets us up for a good second half."

Bonds were moderately lower, however. The yield on the 10-year note rose to 3.95 percent from 3.94 percent late Wednesday. The dollar was higher against other major currencies and gold prices fell.

The Labor Department (search) reported that the number of people filing new claims for unemployment benefits fell by 21,000 last week, the biggest decline in seven weeks. Analysts attributed the improvement to fewer layoffs in the auto industry and a shortened workweek because of the Memorial Day holiday, which gave unemployed workers one less day to file claims.

Shares of FedEx Corp. (FDX) dropped 2.3 percent, or $2.08, to $87.62 and United Parcel Service Inc. fell 1.6 percent, or $1.16, to $71.20 after Morgan Stanley lowered its earnings forecast for FedEx and cut its investment rating on UPS.

Meanwhile, Google Inc. (GOOG) gained 2.4 percent, or $6.75, to $286.31 on Nasdaq after Merrill Lynch raised its 2006 revenue target on the Web search leader.

H&R Block Inc. (HRB) surged to a 15-month high after the largest U.S. tax preparer topped forecasts for fourth-quarter profit and projected fiscal 2006 profit exceeding analysts' views. The shares rose nearly 11 percent, or $5.53, to $56.18.

Research In Motion Ltd. (RIMM) slid 5 percent, or $3.89, to $73.55, after the maker of the popular BlackBerry handheld device said it had reached an impasse in finalizing the settlement of a patent dispute with NTP Inc. In March, Toronto-based Research In Motion agreed to pay NTP $450 million to settle the long-running dispute. The company said Thursday it had filed a motion asking an appellate court to stay a pending appeal and send the case back to district court to enforce the settlement, accusing NTP of refusing to honor its obligations and complete the final documents.

Computer Associates International Inc. (CA) was up a penny at $27.01 after the company said it had agreed to acquire Niku Corp., a provider of information technology management and governance software, for $350 million in cash. The acquisition would give Computer Associates, one of the world's largest business software companies, a foothold in the fast-growing market for information technology governance. Niku soared 25 percent, or $4.16, to $20.66.

Navistar International Corp. (NAV) was up 85 cents at $33.06 after the truck and specialty vehicle maker's second-quarter profits rose 2 percent from last year; it also raised its outlook for the full year. Quarterly income rose to $53 million, or 70 cents per share, and revenue rose 26 percent to $2.97 billion., driven by demand for commercial vehicles. Analysts had expected earnings per share of 71 cents on revenue of $2.68 billion.

Trading was moderate, with 1.43 billion shares changing hands on the New York Stock Exchange, near the 1.46 billion daily average for last year. About 1.66 billion shares were traded on Nasdaq, below the 1.81 billion daily average last year.

The number of stocks rising outnumbered those declining on the NYSE by a ratio of about 9 to 7. On Nasdaq, advancers led decliners by about 3 to 2.

The Russell 2000 index, which tracks smaller company stocks, was up 5.76, or 0.93 percent, at 626.23.

Overseas, Japan's Nikkei stock average fell 1.07 percent. In Europe, France's CAC-40 dropped 0.42 percent, Britain's FTSE 100 added 0.11 percent and Germany's DAX index rose 0.12 percent.

Reuters and the Associated Press contributed to this report.