NEW YORK — Wall Street slipped lower Friday, closing out a year that will be remembered for the stock market's great comeback — a year-end rally that pushed the Dow Jones industrials past 12,000 for the first time.

By all accounts, 2006 ended up a very good year for stocks as bullish investors bounced back from a slumping housing market and the Federal Reserve's two-year campaign of interest rate hikes. The markets approached record levels in the spring, pulled back sharply in the summer but found a clear direction in the fall to send the major indexes to multiyear highs.

Blue chips were the standouts of 2006. The Dow Jones industrial average, the index of 30 of the nation's biggest companies, hit record levels dozens of times since achieving its first close above 12,000 on Oct. 19; it traded as high as 12,529.87 before dipping to its close for the year.

This was the best year for the stock market since 2003, when Wall Street staged a massive recovery from levels sideswiped by a bear market. But 2006 will really be remembered for the market's soaring to heights not seen since the height of the dot-com era — this time, however, Wall Street advanced cautiously, not recklessly.

The rally was fed by investors' growing belief that the economy has withstood well the Fed's rate hikes and the impact of record high oil prices. And some analysts expect the advance to continue.

"The stock market is correct in its judgment that we are probably only in the fifth or sixth inning of the game and that this (economic) expansion may even go into extra innings," said Stuart Schweitzer, global markets strategist for JPMorgan Asset & Wealth Management. "This was a barn-burner of a year, and I expect reasonably solid results over the course of 2007."

On Friday, the Dow fell 38.37, or 0.31 percent, to 12,463.15. The Standard & Poor's 500 index fell 6.43, or 0.45 percent, to 1,418.30, and the Nasdaq composite index closed down 10.28, or 0.42 percent, to 2,415.29.

The major indexes posted healthy gains for the year, with the Dow Jones industrials rising 16.29 percent, the S&P 500 adding 13.62 percent, and the Nasdaq up 9.52 percent. That's the best showing since 2003, when the Dow closed up 25.3 percent, the Nasdaq rose 50 percent, and the S&P 500 gained 26.4 percent — but those gains were the beginning of the market's recovery from the trough of three straight losing years.

Plunging oil prices also fed the stock market's 2006 rally. Crude reached all-time highs in the summer when it briefly surpassed $78 a barrel due to the resilience of consumer demand and expectations of a bad hurricane season. But energy prices soon plummeted back to 2005 levels by the fall when traders saw that refiners in the Gulf of Mexico were untouched by hurricanes, and realized global crude inventories remained ample.

That retreat gave momentum to the stock market's rally, and enabled investors to tolerate upward blips in the price of crude and gasoline.

The price of a barrel of light sweet crude on Friday rose 52 cents to settle at $61.05 on the New York Mercantile Exchange — about 22 percent below its highs of the year.

Stocks are expected to rise further in the new year, but not without some resistance. A big question still hanging over the market is whether the Fed will feel comfortable enough with the balance between inflation and a moderating economy to start lowering interest rates. If inflation seems to be accelerating, an interest rate hike could still be in the offing.

"There is going to be a tug of war between the bulls and the bears as we head into next year," said Quincy Krosby, chief investment strategist for The Hartford.