The prospect of a Greek exit from the eurozone hung over equity markets this week, blunting positive economic news and ultimately leading stocks lower.
The Dow Jones Industrial Average shed 68.93 points (0.38 percent) in the week to 17,947.02.
The broad-based S&P 500 lost 8.38 (0.40 percent) at 2,101.61, while the tech-rich Nasdaq Composite Index dropped 36.49 (0.71 percent) to 5,080.51.
US stocks rose early in the week, with the Nasdaq hitting records two straight days on an apparent breakthrough in the marathon Greek talks, with the debt-wracked country signalling important concessions on pensions and some other matters.
But the tide turned midweek, as Greece and creditors drifted further apart and the rhetoric on both sides intensified.
"Stocks moved hand and glove with our impression of the success and failure of the Greece talks," said Art Hogan, chief market strategist of Wunderlich Securities.
By Friday, Greek Prime Minister Alexis Tsipras was speaking of the latest EU demands as "ultimatums and blackmail," raising the odds of a messy Greek debt default at the end of the month.
Still, many investors continued to believe a deal will be reached over the weekend, said Chris Low, chief economist of FTN Financial.
"But it will be hard," Low predicted. "Investors should be wary."
- Good data overshadowed -
Greece overshadowed an unexpectedly strong jump in May consumer spending and the highest rate of new home sales in seven years, but signalling solid US economic growth.
"The data were quite constructive but took a back seat to what a messy Greek exit might mean," Hogan said.
The week's most dramatic news on the corporate side came in the health sector, with hospital stocks like HCA Holdings and Tenet Healthcare surging after the US Supreme Court upheld a key provision of President Barack Obama's health care reform, guaranteeing insurance coverage to millions of Americans.
Health insurers also rose on the Supreme Court ruling, as well as on expectations of consolidation. Cigna rejected as inadequate an offer from number-two insurer Anthem that the latter said worth $53.8 billion.
But analysts said such a deal could be revived as insurers look to bulk up to keep up with hospital chains, pharmaceutical companies and other sectors in health care that have consolidated. Other insurers, including Aetna and Humana, have been discussed as likely candidates for a big deal.
The media and Internet company IAC/InterActiveCorp announced it would spin off its lucrative Match unit of online dating programs, which include the popular services Tinder, OkCupid and OurTime.
US agriculture and seed giant Monsanto restated its hope to acquire Syngenta Wednesday despite repeated rejections by the Swiss company, which has said Monsanto is not offering adequate compensation for the possibility the transaction would be blocked by antitrust regulators.
Food distributor Sysco was assessing its options after a federal judge blocked its proposed $3.5 billion takeover of US Foods due to opposition from antitrust regulators.
Next week's calendar includes June auto sales, consumer confidence and the June jobs report, though trade volume could be moderate going into the July 4 holiday weekend.