Stocks finished higher on Monday, extending the recent rally after Apple said it would pay a $10 billion annual dividend and buy back stock.

Based on the latest available data, the Dow Jones industrial average <.DJI> edged up 6.51 points, or 0.05 percent, to close unofficially at 13,239.13. The Standard & Poor's 500 Index <.SPX> added 5.58 points, or 0.40 percent, to finish unofficially at 1,409.75. The Nasdaq Composite Index <.IXIC> gained 23.06 points, or 0.75 percent, to end unofficially at 3,078.32.

The S&P 500 climbed within 10 percent of its 2007 all-time closing high.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)