By Caitlin Ostroff and Juliet Chung

U.S. stocks rose Thursday as the number of Americans applying for unemployment benefits came in below expectations, but still held at historically high levels.

The S&P 500 rose 0.4% to 3339.8. The Dow Jones Industrial Average added 0.4%, while the tech-heavy Nasdaq increased 0.7%.

Driving the trading, about 1.2 million filed new claims for unemployment benefits for the week ended Aug. 1, fewer than the 1.4 million analysts expected.

Ram Lee, president of New York-based Seven Bridges Advisors, said the dip in weekly jobless claims--the lowest number since March--clearly illustrated how the pandemic has moved the goalposts for what constitutes positive developments.

"We've not seen prior to this year weekly jobless numbers over about 700,000" since the 1980s, Mr. Lee said. "We've gotten used to numbers that are so large any improvement is seen as good news. But you still have a pretty meaningful contraction of GDP and a huge amount of joblessness."

The S&P 500 has risen over the last four trading sessions as investors bet that lawmakers will hammer out the terms of a new coronavirus-relief package. The White House on Wednesday moved to increase pressure on Democrats to get the deal done, saying they were prepared to walk away from negotiations and use executive actions by President Trump if an agreement isn't within reach by the end of the week. White House chief of staff Mark Meadows said Thursday Mr. Trump would take executive actions on jobless aid if talks didn't advance.

Despite lingering differences on the elements of a new relief package, investors expect the government will come through with spending plans as economic data shows signs of a stalling recovery.

"The fact that the jobs market hasn't picked up so fast... means there is a greater chance of this fiscal stimulus getting passed," said Ipek Ozkardeskaya, senior analyst at Swissquote Bank. "Even if the economy goes well, investors will still be asking for the Federal Reserve and the government to have their hands on the market."

The S&P's communication services sector led the index's gains, with Walt Disney gaining 2.2%. Daniel Loeb's Third Point LLC hedge fund on Thursday told clients it had taken a stake in Walt Disney Co. in the second quarter. The letter said Disney's sell-off this year amid the pandemic overlooked that the virus could accelerate Disney's streaming plans--its "biggest market opportunity ever."

Gains by Facebook, Google parent Alphabet and Netflix also contributed to the sector's gains. Big tech companies have led gains for the index for much of the year.

The index's healthcare sector, meanwhile, saw the biggest loss through mid-day, selling off 1%. President Trump was expected to sign an executive order Thursday to help increase production of essential medicines, medical equipment and protective gear in the U.S.

Lisa Wheatley, portfolio manager of NicHealth, the healthcare strategy of Nicholas Investment Partners in the San Diego area, said the order could antagonize China as well as increase costs to U.S. consumers of generic drugs. "This is early stage, but there's a little skittishness over whether this is the start of the traditional rhetoric over healthcare you expect in an election year," Ms. Wheatley said.

Among the day's big movers, shares in Bristol-Myers Squibb rose 3.4% after second-quarter profits beat consensus estimates and shares in Bausch Health Cos. soared 15% after it said it is planning to spin off its eye-care business, confirming a Wall Street Journal report.

Shares in GoDaddy gained 12% after the web hosting and domain-name registration company reported fiscal second-quarter revenue that exceeded Wall Street estimates.

Overnight, the mood in markets dimmed after U.S. Secretary of State Mike Pompeo asked American companies to consider withholding their apps from phones made by China's Huawei Technologies, according to analysts. Mr. Pompeo also urged the companies to halt using Chinese cloud providers such as Tencent, Alibaba and Baidu for storing sensitive data.

Those comments are stoking concern that the U.S. pushback on Chinese apps could go beyond TikTok, analysts said. The popular video-sharing service has been in the eye of a storm as Microsoft moves to buy its U.S. operations from its Chinese owner after President Trump raised security concerns about the app.

In Asia, major markets ended the day on a mixed note. The Shanghai Composite gained 0.3% by the close of trading, while Hong Kong's Hang Seng fell 0.7% and Japan's Nikkei 225 index dropped 0.4%.

Gold gained 1% to $2,069.10 a troy ounce, putting its advance this year at 35% as the precious metal, considered a haven asset, continued to draw risk-averse investors.

In bond markets, the yield on the 10-year Treasury edged lower to 0.527%, from 0.541% Wednesday. Yields fall when prices rise.

The British pound ticked up 0.3% against the U.S. dollar after the Bank of England held its benchmark interest rate steady and said negative interest rates may not be the right tool to spur faster activity. Policy makers projected that the U.K. economy will take until the end of next year to make up the ground lost during the coronavirus pandemic.

Write to Caitlin Ostroff at caitlin.ostroff@wsj.com and Juliet Chung at juliet.chung@wsj.com