The S&P 500 healthcare index rose 0.5 percent after the court ruled that the 2010 Affordable Care Act, widely known as Obamacare, did not restrict the subsidies to states that establish their own online healthcare exchanges.

Hospital operators were among the biggest beneficiaries of the ruling, with investors relieved that the growing number of paying customers created by Obamacare would not disappear.

"While any change in policy would've been a surprise, affirming the status quo removes a lot of uncertainty from the sector," said Michael O'Rourke, chief market strategist at JonesTrading in Greenwich, Connecticut.

The S&P 500 healthcare sector trades at 24.3 times analysts' estimates of future earnings, while the S&P 500's forward P/E is 17.6, according to Thomson Reuters data.

The Dow Jones industrial average fell 75.71 points, or 0.42 percent, to 17,890.36, the S&P 500 lost 6.27 points, or 0.3 percent, to 2,102.31 and the Nasdaq Composite dropped 10.22 points, or 0.2 percent, to 5,112.19.

Wall Street continued to take cues from the ongoing Greek debt crisis as the country again failed to clinch a deal with its international creditors, setting up a last-ditch effort on Saturday to avert a default next week.

Euro zone finance ministers ended their third meeting in a week without agreement after the three creditor institutions put a final cash-for-reform proposal on the table in a showdown with Athens' leftist government.

Energy shares were the weakest of the day, with the S&P energy index down 1 percent. U.S. crude futures settled down about 1 percent at $59.70 per barrel, weighed by weaker U.S. refined fuels markets. Occidental Petroleum fell 1 percent to $78.53.

IAC/Interactive jumped 5.1 percent to $81.19 after the company said it planned to list its dating business, which includes Match.com and mobile app Tinder.