(AP) -- Stocks closed broadly lower for the second day in a row Friday as Wall Street gave back some of its gains from a mostly solid July rally.
The S&P 500 fell 0.6% and ended the week with its first weekly loss in four weeks. The pullback, which eased somewhat by afternoon, came as traders turned cautious amid increased tensions between the world's two largest economies and a mixed batch of company earnings reports.
Technology and health care companies accounted for much of the selling, with chipmaker Intel posting the biggest drop in the S&P 500. Those losses outweighed gains by companies that rely on consumer spending, including Olive Garden owner Darden Restaurants, homebuilder PulteGroup and retailers Target and Best Buy. Stocks also sank across Asian and European markets.
Cautious investors shifted money into gold, driving its price to an all-time high of nearly $1,900 an ounce. The last record high for gold was set in 2011. Treasury yields held relatively steady, but remain close to their lowest levels since April.
"Investors are already wondering whether prices are too high and then you get a little bit of tension with China, you get a little bit of disappointing news from Intel, and that just sort of feeds on itself," said Mike Zigmont, director of trading and research at Harvest Volatility Management.
The S&P 500 dropped 20.03 points to 3,215.63. The Dow Jones Industrial Average slid 182.44 points, or 0.7%, to 26,469.89. The Nasdaq composite fell 98.24 points, or 0.9%, to 10,363.18.
Each of the indexes had been down more sharply in the morning, with the Nasdaq off by as much as 2.3%. Small company stocks were the biggest losers. The Russell 2000 index gave up 22.65 points, or 1.5%, to 1,467.55.
The coronavirus pandemic remains the most dominant force in markets, with its potential to destroy lives and economies. But other risks are also bubbling up, headlined by Friday's worsening relations between the United States and China.
Investors are also concerned about a recent uptick in layoffs as spiking coronavirus counts across the Sun Belt lead more businesses to shut down. Extra benefits for those out-of-work Americans from the federal government are set to expire soon, and worries are rising about whether Congress can reach a deal on more aid for the economy. Nearly half of Americans whose families experienced a layoff during the pandemic believe those jobs are lost forever, according to a poll from The Associated Press-NORC Center for Public Affairs Research.
Despite all those challenges, the S&P 500 remains only about 5% below its record set in February, after roaring back from an earlier, nearly 34% plummet. This week's stall for the S&P 500 follows three straight weekly gains driven by hopes that the economy was regaining its footing. Underlying it all is massive aid for the economy promised by the Federal Reserve, including record-low interest rates.
"The Fed is the big story behind this market, that and the liquidity it's provided," said Teresa Jacobsen, managing director at UBS Private Wealth Management. "It gives a great deal of support for upside in the market. But, there are momentary blips when we pause and give a little back."
On Friday, the blip came after China's Foreign Ministry ordered the closure of the U.S. consulate in the western city of Chengdu. It echoes a similar move earlier this week by the United States to close the Chinese consulate in Houston.
Such moves have investors on edge because of how viciously markets swung in prior years when President Donald Trump was pressing his trade war with China, before they agreed to a temporary truce early this year.
"Alongside the eviction of the Houston Chinese Consulate, the risk of the U.S.-China conflict escalating into a 'Cold War' is worrying," said Hayaki Narita of Mizuho Bank.
A speech Thursday by U.S. Secretary of State Mike Pompeo saying that "securing our freedom from the Chinese Communist Party is the mission of our time" adds to the rhetoric certain to incense Beijing, making it still more difficult for either side to back down, he said.
Technology stocks have also been in the spotlight, after a sharp slide for them on Thursday helped drag the S&P 500 to its worst loss in nearly four weeks.
Microsoft, Apple, Amazon and other giants have cruised through much of the pandemic on expectations that they can keep growing despite all the challenges for the economy. But critics say enthusiasm for them was overdone, with prices too high even after accounting for the huge profits that they can produce.
Apple slipped 0.2% after having been down 4% earlier in the day. Microsoft slid 0.6%. Intel sank 16.2% after it delayed the release of its new 7 nanometer chip.
The yield on the 10-year Treasury held steady at 0.58%. It tends to move with investors' expectations for the economy and inflation.
In commodities trading, the price of gold for delivery in August, the most actively traded contract, rose $7.50 to $1,897.50 an ounce. That beat the previous record high close of $1,891.90 set in August 2011.
Benchmark U.S. crude oil for September delivery rose 22 cents to settle at $41.29 a barrel Friday. Brent crude oil for September delivery rose 3 cents to $43.34 a barrel.