U.S. stocks ended the last day of 2004 slightly down Friday, but the main U.S. indexes posted their second successive year of gains following a fourth-quarter rally.

In light trading, a late flurry of profit-taking pulled the indexes lower, after a rebound in steel stocks had offered support earlier in the session.

Shares of drugmaker Eli Lilly and Co. (LLY), manufacturer of antidepressant drug Prozac, fell 1.3 percent to $56.75. The British Medical Journal said it has sent documents to U.S. regulators that it said appear to suggest a link between Prozac (search) and suicidal behavior.

The Dow Jones industrial average ended down 17.29 points, or 0.16 percent, at 10,783.01. The Standard & Poor's 500 Index was down 1.63 points, or 0.13 percent, at 1,211.92. The technology-laced Nasdaq Composite Index fell 2.90 points, or 0.13 percent, at 2,175.44.

Trading volume was light on Friday, with about 800 million shares traded on the New York Stock Exchange (search), way below the 1.4 billion daily average for last year. On the Nasdaq, about 1.36 billion shares were traded, below the 1.69 billion daily average last year.

On both exchanges, advancers roughly equaled decliners.

For the year, the Dow rose 3.2 percent, the S&P 500 gained 9 percent, and the Nasdaq Composite Index (search) rose 8.6 percent.

All three major U.S. stock market gauges hit their highest points this week since the summer of 2001.

Losses in the final trading session of the year could not spoil a positive end to 2004 for U.S. markets, which rallied after the re-election of U.S. President George W. Bush on Nov. 2 and a slide in crude oil prices which reached a peak of $55.67 a barrel on Oct. 25.

"It has been a tricky year," said Larry Wachtel, senior vice president at Wachovia Securities LLC. "From February through the end of October, not much happened."

"Then we had the price of oil topping out and we had the election, and for the last two months it was a good year," he added.

Steel stocks, hit Thursday on fears that oversupply may depress prices, bounced back Friday. Nucor Corp. rose 1.9 percent to $52.34 and United States Steel Corp. climbed 2.4 percent to $51.25.

Pfizer Inc. (PFE) fell even after the pharmaceutical company said it won government approval for a nerve pain drug. Pfizer shares ended down 12 cents at $26.89 on the NYSE.

Year of Oil and Politics

In 2004, some sectors in the S&P 500, including those boosted by global demand for commodities, posted impressive gains.

Energy stocks rose 28.7 percent, utilities climbed 19.6 percent, industrials and telecom services rose 16 percent, consumer discretionaries jumped 12 percent, materials were up 11 percent, and financials rose 8 percent.

Small-capitalization stocks outperformed large caps for the sixth straight year in 2004, according to data from Russell Indexes. Small caps ended 18.6 percent higher in 2004, while large caps ended up 11.5 percent.

Among 2004's worst performing sectors in the S&P 500 were consumer staples, up 6 percent, while information technology stocks edged up a mere 2.1 percent and healthcare stocks rose barely 0.23 percent.

Uncertainty over the U.S. election outcome and high oil prices — the average U.S. crude price was 34 percent higher in 2004 — weighed on markets for many weeks throughout the year.

Higher energy prices can hurt consumer spending and corporate profits, while lower oil usually helps most stocks.

"The market technically made its low in August, but it really didn't take off until around the election, coinciding with the peak in oil prices," said Michael Metz, chief investment strategist at Oppenheimer & Co.

"Once the market did turn you saw a lot of momentum traders and performance-oriented portfolios hop aboard," Metz added.

Concerns over supply and security for Middle East and African producers helped drive crude prices higher. Rapid demand growth in China, India and the United States forced the Organization of the Petroleum Exporting Countries (OPEC) to pump at their highest level in 25 years.

But crude prices have dropped back 22 percent over the last two months on signals that higher fuel costs were beginning to weigh on economic growth.