U.S. stocks reversed and closed lower Thursday after debt negotiations between Greece and its creditors stalled, putting Athens at risk of default as the country’s bailout program expires in five days. Eight of the 10 S&P 500 sectors closed lower, led by declines in energy. Healthcare and technology were the only sectors that closed higher.

The Dow Jones Industrial Average (INDEXDJX:.DJI) dropped 75.71 points, or 0.42 percent, to close at 17,890.36. The Standard & Poor’s 500 index (INDEXNASDAQ:.IXIC) dipped 6.27 points, or 0.30 percent, to finish at 2,102.31. The Nasdaq composite (INDEXSP:.INX) fell 10.22 points, or 0.20 percent, to end at 5,112.19.

The Dow Jones Transportation Average extended losses for the second day and dropped nearly 1 percent, due to sharp declines in transportation and railway stocks. The index has lost nearly 10 percent so far this year.

Caterpillar Inc. (NYSE:CAT), the world’s largest construction and mining equipment company, was the biggest laggard in the Dow, down 1.6 percent. Dow component UnitedHealth Group Inc. (NYSE:UNH) was the largest gainer in the blue-chip index higher, up 2.7 percent.

However, the S&P 500 healthcare sector gained 0.5 percent Thursday, led by gains in hospital stocks, after the U.S. Supreme Court ruled federal subsidies under the Affordable Care Act are legal. Tenet Healthcare Corp. (NYSE:THC) was the largest gainer, soaring 12 percent.

Greece continued to weigh on U.S. stocks this week after talks between Athens and its creditors stalled Thursday, putting Athens at risk of default as the country’s bailout program expires on June 30.

Officials are scheduled to meet on Saturday for a last-ditch effort to save Greece from defaulting on its debt. The meeting could be one of the last chances for Greece to reach a deal before the government must repay 1.6 billion euros ($1.8 billion) to the International Monetary Fund on Tuesday.

Economists are looking ahead to Friday’s economic calendar, which includes the University of Michigan’s consumer sentiment report for June, due out at 10 a.m. EDT.