Stocks declined on Wednesday as sliding oil and metals prices gave investors a reason to sell commodity-related shares.

A sharp fall in U.S. crude oil futures hit energy stocks, prompted by talk of a release of some U.S. and European strategic oil reserves. Materials shares dropped as well.

A weaker-than-expected report on U.S. durable goods orders deflated some of the recent investor optimism over the economy, leading to softness in industrial shares.

Analysts also said quarter-end stock buying, which lifted stocks earlier this week and caused a number of top performers to hit new 52-week highs, may be waning.

Window dressing at the end of quarter has probably driven up stock prices over the last couple of days, said Robbert Van Batenburg, head of equity research at Louis Capital in New York.

That upward pressure is fading away, he added. If you buy a stock now, it's going to settle on Monday, and it won't show up in the first-quarter results.

Caterpillar Inc, down 3.5 percent at $104.26, was the biggest drag on the Dow. Major oil companies Exxon Mobil Corp, down 0.9 percent at $85.86, and Chevron Corp, down 1.1 percent at $105.89, also weighed heavily on the blue-chip average.

The S&P 500 materials sector index, down 1.5 percent, led the broad market's decline, followed by the S&P energy sector index, down 1.2 percent. All S&P 500 sectors were lower, except for financials.

Despite the decline, the S&P 500's ability to hold the 1,400 level was an indication that the market's uptrend was still in place, said Jim Paulsen, chief investment officer at Wells Capital Management.

The Dow Jones industrial average fell 71.52 points, or 0.54 percent, to 13,126.21 at the close. The Standard & Poor's 500 Index slipped 6.98 points, or 0.49 percent, to 1,405.54. The Nasdaq Composite Index declined 15.39 points, or 0.49 percent, to 3,104.96.

The S&P 500 is still up 11.8 percent so far for the first quarter, which is expected to be the best three-month period for the broad market index since the third quarter of 2009.

Gold and copper prices dropped as the durable goods orders curbed investors' appetite for risk.

Data showed new orders for U.S. manufactured goods rose 2.2 percent in February, falling short of a consensus forecast for a 3 percent gain, while a gauge of future business investment also missed forecasts, casting a shadow on the manufacturing sector's support of the recovery.

Much of the market's recent gains have come in the wake of improved economic data and accommodative monetary policies by the U.S. Federal Reserve and other central banks around the world. On Tuesday, Fed Chairman Ben Bernanke, asked in an ABC News interview about the potential for more quantitative easing, said the Fed wasn't taking any options off the table.

We're ahead of where I thought we'd be right now, said Thomas Villalta, portfolio manager for Jones Villalta Asset Management in Austin, Texas.

Among the sectors leading gains for the quarter, the S&P financial index ended the day up 0.4 percent and looks poised to see more strength, he said.

Our view is financials will continue to build, mainly because they're coming off such a low base, Villalta said.

In the tech sector, the stock of Apple Inc hit yet another lifetime high of $621.45. The company said it will offer a refund to buyers of its new iPad in Australia after it was accused of misleading advertising.

Apple's stock closed at $617.62, up 0.5 percent for the day.

Volume was slightly above average, with 6.84 billion shares on the New York Stock Exchange, the Nasdaq and the Amex. For the year to date, the daily average volume is 6.83 billion.

Decliners outnumbered advancers on the NYSE by a ratio of 19 to 11, while on the Nasdaq, 16 stocks fell for nearly every nine that rose.

(Additional reporting by Angela Moon; Editing by Jan Paschal)