By Caitlin Ostroff and Juliet Chung

U.S. stocks rose slightly 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.2% to 3333.68, near its record close in February. The Dow Jones Industrial Average added 0.2%, while the tech-heavy Nasdaq was up 0.4%.

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 goal posts 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.

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.

"Is Congress going to come to an agreement as soon as possible? I don't think the market is pricing in any kind of a disappointment," said Seema Shah, chief strategist for Principal Global Investors. "Once you take away any of the fiscal help, it puts the recovery really at risk."

"The fact that the jobs market hasn't picked up so fast also 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."

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