U.S. stocks closed lower on Wednesday, led by declines in energy and mining companies as prices for oil, metals and other commodities weakened. Disappointing company results or outlooks also pulled the market lower, placing it on track for its first weekly loss since mid-February.

On Wednesday:

The Dow Jones industrial average fell 79.98 points, or 0.5 percent, to 17,502.59.

The Standard & Poor's 500 index slid 13.09 points, or 0.6 percent, to 2,036.71.

The Nasdaq composite index lost 52.80 points, or 1.1 percent, to 4,768.86.

For the week:

The Dow is down 99.71 points, or 0.6 percent.

The S&P 500 is down 12.87 points, or 0.6 percent.

The Nasdaq is down 26.79 points, or 0.6 percent.

For the year:

The Dow is up 77.56 points, or 0.5 percent.

The S&P 500 is down 7.23 points, or 0.4 percent.

The Nasdaq is down 238.55 points, or 4.8 percent.