U.S. stocks are ending modestly lower following a sell-off in the Chinese market and concerns about an approaching deadline for Greece to make a debt payment.

On Thursday:

The Dow Jones industrial average lost 36.87 points, or 0.2 percent, to 18,126.12.

The Standard & Poor's 500 index closed down 2.69 points, or 0.1 percent, to 2,120.79.

The Nasdaq composite fell 8.62 points, or 0.2 percent, to 5,097.98.

For the Week:

The Dow is down 105.90 points, or 0.6 percent.

The S&P 500 is down 5.27 points, or 0.3 percent.

The Nasdaq is up 8.61 points, or 0.2 percent.

For the year:

The Dow is up 303.05 points, or 1.7 percent.

The S&P 500 index is up 61.89 points, or 3 percent.

The Nasdaq is up 361.92 points, or 7.6 percent.