Intensifying geopolitical tensions weighed on stocks and bond yields Thursday, chipping away at major indexes’ gains for the week.

The S&P 500 fell 1.7%, while the Dow Jones Industrial Average slipped 1.5%. The tech-focused Nasdaq Composite Index dropped 2.3%.

The losses were broad-based, with nine out of 11 of the S&P 500’s groups declining....

Intensifying geopolitical tensions weighed on stocks and bond yields Thursday, chipping away at major indexes’ gains for the week.

The S&P 500 fell 1.7%, while the Dow Jones Industrial Average slipped 1.5%. The tech-focused Nasdaq Composite Index dropped 2.3%.

The losses were broad-based, with nine out of 11 of the S&P 500’s groups declining. The S&P and Dow are on track to notch weekly losses, while the Nasdaq is headed for a slim gain.

Stocks have come under pressure from the escalation in tensions between Russia and Western allies over Ukraine. The White House warned that a Russian invasion could be imminent, and diplomatic efforts have so far been inconclusive.

The developments have whipsawed stocks throughout the week. Moscow said it had pulled back some troops, which spurred a rally in markets earlier in the week. Western officials said Wednesday that Russia was actually continuing its military buildup. 

“We’ve got to put more focus on what’s being done on the ground, rather than what’s being said,” said Paul Jackson, global head of asset allocation research at Invesco. “My presumption is that this will be sorted out diplomatically. If markets go down a lot more, then I would think it would be an opportunity to buy.”

He said he isn’t expecting a major change from Russia while its ally, China, hosts the Winter Olympics. The Games conclude this weekend so “we still have a little while to go before we can feel things have really dissipated on a permanent basis,” Mr. Jackson said. “In the interim, it’s a propaganda game.” 

The geopolitical tensions come at a time when investors have already been grappling with high inflation and preparing for the Federal Reserve to raise interest rates this year. These shifts have roiled the stock and bond markets for much of the year.

On Thursday, fresh data showed that weekly U.S. jobless claims, a proxy for layoffs, came in at 248,000, up from the previous week. Economists had expected claims to continue edging down, given the tight labor market.

The yield on the benchmark U.S. 10-year Treasury note edged down to 1.979% in recent trading from 2.044% Wednesday. Gold prices rose around 1.6%.

Footage released Wednesday by Russia’s Defense Ministry showed trains ferrying tanks across the Crimean Bridge as Russia said it was moving troops from positions near Ukraine’s border. A NATO official said Moscow’s military buildup around Ukraine continues. Photo: Russian Defense Ministry Press Service/EPA/Shutterstock

The Russian ruble weakened around 1% against the dollar. The currency has seesawed in recent days as investors tried to gauge the severity of the tensions.

In corporate news, DoorDash surged 12% after the food-delivery company reported a jump in revenue. Palantir Technologies tumbled 14% after posting a wider loss. Walmart rose 3.5% after it reported profit that beat estimates and increased its dividend.

Cisco Systems rose 3.4% after reporting revenue and earnings above Wall Street’s expectations, plus an increase to its stock-buyback program. Nvidia declined 7.5% despite reporting record sales, making it one of the worst performers in the S&P 500. It said its automotive segment saw a sharp drop in revenue due to supply-chain issues.

A trader at the New York Stock Exchange on Wednesday.

Photo: Courtney Crow/Associated Press

Overseas, the pan-continental Stoxx Europe 600 fell 0.7%.

Asian benchmarks were mixed. The Shanghai Composite Index was little changed, while Hong Kong’s Hang Seng Index rose 0.3%. Japan’s Nikkei 225 declined 0.8%. 

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com and Gunjan Banerji at gunjan.banerji@wsj.com.