U.S. stocks closed lower on Thursday, capping the worst year for the market since 2008.

The Standard & Poor’s 500 index ended essentially flat for the year after the day’s modest losses nudged it into the red for 2015. Even factoring in dividends, the index eked out a far smaller return than in 2014.

advertisement | advertise on newsday

The Dow Jones industrial average also closed out the year with a loss. The tech-heavy Nasdaq composite fared better, delivering a gain for the year.

Trading was lighter than usual on Thursday ahead of the New Year’s Day holiday. Technology stocks were among the biggest decliners, while energy stocks eked out a tiny gain thanks to a rebound in crude oil and natural gas prices.

The Dow ended the day down 178.84 points, or 1 percent, to 17,425.03. The S&P 500 index lost 19.42 points, or 0.9 percent, to 2,043.94. The Nasdaq composite fell 58.43 points, or 1.2 percent, to 5,007.41.

For 2015, the Dow registered a loss of 2.2 percent. It’s the first down year for the Dow since 2008. The Nasdaq ended with a gain of 5.7 percent.

The S&P 500 index, regarded as a benchmark for the broader stock market, lost 0.7 percent for the year.