But after topping 13,027, a late-day selloff left the index near 12,982.
SAN FRANCISCO - U.S. stocks mostly edged higher Monday, with the Dow industrials falling short of a close above 13,000, as a rise in planned home purchases offset disappointment over the G-20's potential support for Europe.
The Standard & Poor's 500 index advanced 1.85 points, or 0.1 percent, to close at 1,367.59, while the Nasdaq composite index increased 2.41 points, or 0.1 percent, to close at 2,966.16.
The Dow Jones industrial average, however, declined 1.44 points to close at 12,981.51 after a sell-off in the final moments of trading. The index rose as high as 13,027.52 during the day.
J.P. Morgan Chase & Co. and Bank of America Corp. were the best performers on the index, each closing 2 percent higher. Hewlett-Packard Co. shares led declines among Dow components.
"What we've been seeing recently is: European worries have started us down, but then U.S. data comes in surprisingly strong and continues to move people into being less worried about downside risk," said Bill Stone, chief investment strategist at PNC Wealth Management Group.
The last time the Dow closed above 13,000 was May 19, 2008, when it ended the day at 13,028.16. The first ever time the Dow closed above 13,000 was on April 25, 2007.
Monday was the second straight session the Dow has breached 13,000 intraday and then closed under the round-number mark.
The National Association of Realtors, in a midmorning release, said pending home sales climbed 2 percent in January to the highest level since April 2010. Compared to January 2011, pending home sales were up 8 percent.
Home-builder stocks fared well, with shares of Lennar Corp. up 2.5 percent and shares of D.R. Horton Inc. and Standard Pacific Corp. both up 1.9 percent.
Financial stocks led the S&P 500 higher, followed by consumer discretionary stocks such as Whirlpool Corp., whose moves have been linked to housing sentiment. Whirlpool shares closed up 6.7 percent.
The U.S. dollar pared gains against the euro after Germany's parliament backed the next bailout package for Greece.
The euro, which touched a three-month high against the greenback last week, fell to $1.339 compared with $1.346 late Friday.