By Anna Isaac and Gunjan Banerji

Shares of technology heavyweights dragged U.S. stocks lower Friday, putting them on track for weekly declines.

The S&P 500 ticked down about 0.6%. The Dow Jones Industrial Average lost about 130 points, or 0.5%. The tech-heavy Nasdaq Composite shed 0.9%.

The week has been marked by big swings among shares of individual companies and a rotation between some of the market's recent winners and losers. The information technology sector -- one of the market's biggest winners this year -- was one of the biggest laggards of the S&P 500's 11 sectors in trading Friday.

Shares of some tech heavyweights and momentum-driven stocks faltered. Facebook and Apple are on track to fall more than 4% this week, underperforming the broader market. Tesla has shed 5.4% this week.

Shares of Intel fell 15.5% Friday. The chip maker reported stronger earnings in the second quarter after Thursday's market close, but also signaled a delay to its development of superfast chips.

"The concentration of the S&P 500 among the tech names is adding to the momentum downward," said Amy Kong, chief investment officer of Barrett Asset Management. "Momentum definitely builds to the upside and it also builds to the downside."

The five largest stocks in the index -- Apple, Microsoft, Amazon.com, Alphabet and Facebook -- recently made up about a quarter of the index, the highest proportion in at least 30 years, according to Goldman Sachs analysts.

Investors will be keeping a close eye on tech earnings releases over the next week, with Amazon.com Inc. and Google-parent Alphabet reporting their financial results.

Investors flocked to these companies, which they viewed as relatively shielded from the pandemic's economic damage. If they falter after earnings, that poses a threat to the broader stock market given their outsize influence on the S&P 500.

Anxiety about the coronavirus pandemic and geopolitical tensions around the globe were evident in the market for gold, with prices surging toward all-time highs.

Also hanging in the backdrop is rising tension between Washington and Beijing that threatens to cloud prospects for trade between the world's two largest economies.

China on Friday ordered the closure of the U.S. consulate in Chengdu, a city in the southwestern part of the nation, in a tit-for-tat retaliation against Washington's decision to shut down the Chinese consulate in Houston. The closures mark another step in the deterioration of relations between the two nations, which have clashed over trade, technology, handling of the coronavirus pandemic and global influence.

China's major stocks benchmark, the Shanghai Composite Index, fell 3.9% by the close of trading, capping off a second consecutive week of declines. Hong Kong's Hang Seng Index retreated 2.2%.

"Today's act by China is seen as an actual political retaliation, as opposed to the typical verbal scuffles that had been going on," said Ong Zi Yang, senior macro analyst at FSMOne.com in Singapore. "The escalation in geopolitical tensions has encouraged varying degrees of profit-taking among investors, especially as Chinese equities have rallied quite significantly since the global equities sell-down in March."

Adding to the tensions, Secretary of State Mike Pompeo on Thursday called on the Chinese people to alter the ruling Communist Party's direction, though he stopped shy of explicitly calling for regime change. Such uncompromising rhetoric from Trump administration officials in recent weeks has been accompanied by an uptick in pressure on Beijing, from sanctions to military exercises and indictments.

The downward spiral in the relationship has shown signs of spilling over into trade matters. President Trump told reporters on Thursday that the "phase one" trade deal with China signed in January "means less to me now than it did when I made it." Investor confidence has been shaken by the uptick in tensions, especially as key allies of the U.S. have also started to embrace its harder-edged approach to China.

"The overall tone has become far more hawkish from the U.S. since the passing of the national-security law in Hong Kong," said Edward Park, deputy chief investment officer at Brooks Macdonald. "The pick-up in the U.S.-China tension has broadened out to other developed-world nations including the U.K. and Australia."

U.S. stocks have also been sensitive this week to cues on whether lawmakers will have a new stimulus bill hammered out before their summer break in August. Senate Republicans scrapped their plans to release a proposal for the next coronavirus relief bill Thursday after continued differences with the White House. With the delay, Republicans won't roll out their roughly $1 trillion legislation until next week, further compressing an already tight timeline to reach an agreement with Democrats.

"The road toward an agreement is expected to be bumpy, so markets are taking a breather," said Geoff Yu, senior markets strategist BNY Mellon. "It's important to avoid a sense of a cliff in household expectations. That would be a problem for the U.S. and the rest of the world as well."

Overseas, the pan-continental Stoxx Europe 600 dropped 1.7%.

--Chong Koh Ping contributed to this article.

Write to Anna Isaac at anna.isaac@wsj.com and Gunjan Banerji at Gunjan.Banerji@wsj.com