U.S. stocks rose on Monday with the S&P 500 now less than 10 percent away from its historic closing high of October 2007, buoyed by Apple after the company said it will pay a dividend and buy back stock.

Shares of Apple Inc , which accounts for about 19 percent of the Nasdaq 100 <.NDX>, gained 2.4 percent to $599.40, while the S&P technology index <.GSPT> gained 0.8 percent. Apple briefly topped the $600 mark for the first time last week.

With a heavy weighting in several indexes, Apple has often dictated market direction. The stock has a 50-day correlation of 0.95 with the S&P 500, which many analysts say was a big reason for the benchmark's run higher.

Investors have been reluctant to put money to work for awhile, but Apple is giving greater confidence for them to invest in stocks, said Rick Meckler, president of investment firm LibertyView Capital Management in New York.

Apple, maker of the iPad and iPhone, said it will pay a regular quarterly dividend of $2.65 a share - its first dividend since 1995 - and buy back up to $10 billion of its stock, starting in the next fiscal year. Speculation had heated up in recent weeks over how the world's most valuable publicly traded company might use its cash stockpile of $98 billion.

The Dow Jones industrial average <.DJI> was up 25.43 points, or 0.19 percent, at 13,258.05. The Standard & Poor's 500 Index <.SPX> was up 7.31 points, or 0.52 percent, at 1,411.48. The Nasdaq Composite Index <.IXIC> was up 23.69 points, or 0.77 percent, at 3,078.95.

The S&P 500 is now less than 10 percent below the historic closing high of 1,565.15 in October 2007. On Friday, the broad market index had its fifth straight weekly gain and its best week in three months.

United Parcel Service Inc rose 2.7 percent to $81.10 after hitting a new high as it clinched a deal to buy Dutch peer TNT Express , making UPS the market leader in Europe.

On the economic front, U.S. homebuilder sentiment was unchanged in March, holding at its highest level since June 2007, while sentiment in February was revised lower. Market reaction was muted.

Broadcom Corp gained 2.9 percent to $38.90 after the chipmaker said it won a preliminary injunction against Emulex Corp in a patent infringement lawsuit.

(Reporting by Angela Moon; Editing by Jan Paschal)