By Liza Lin

A White House-approved plan to transform TikTok into a U.S.-based company would keep the operation of the viral short-video app, and likely the algorithm that has powered its rise, in Chinese hands. This structure improves the deal's chances of finding favor in Beijing, which had threatened to veto a sale.

President Trump said Saturday he had given his blessing to a deal that would see TikTok partner with Oracle Corp. and Walmart Inc. to form a new entity called TikTok Global that would provide services to TikTok's current users in the U.S. and most of the world outside China.

Under the terms of the deal, TikTok's parent, Beijing-based ByteDance Ltd., would retain roughly 80% ownership of the new company, with Oracle and Walmart holding the rest, people familiar with the situation told The Wall Street Journal earlier. Because ByteDance is roughly 40% owned by U.S. investors, the new company, with the Oracle and Walmart stakes, could be described as having majority American ownership, they said.

At the same time, ByteDance's 80% stake in TikTok would allay fears in Beijing that the White House was forcing China to relinquish one of the world's hottest technology properties -- or face a ban in the critical U.S. market.

At least in the short term, people close to the company and market observers described the arrangement as a win for China and for ByteDance.

A joint statement on the deal released Saturday by Oracle and Walmart didn't mention any transfer of TikTok's core algorithms, the artificial intelligence-driven content-recommendation engine widely acknowledged to be vital to its success.

Last month, Beijing imposed restrictions on the export of artificial-intelligence technology, in a surprise move that threw a monkey wrench into ByteDance's negotiations with a handful of U.S.-based suitors. A person familiar with the company said the technology and core algorithms would be retained by ByteDance.

Trump's signoff on TikTok's deal with Oracle is a sign that the hardest part of the ordeal is over, though the U.S. government still has to process the details of the agreement, Zhang Yansheng, an economics professor at Renmin University, said Sunday. Beijing's main concerns are about the sale of TikTok's algorithm and U.S. ownership of the app, both of which seem to be addressed in the deal, he said.

"China will care about whether or not this company is still Chinese," Mr. Zhang said.

Hu Xijin, the editor in chief of the Global Times, a Communist Party-backed tabloid, said the deal was unfair, but less costly for ByteDance than a full shutdown or sale of TikTok's U.S. operations.

"The plan shows that ByteDance's moves to defend its legitimate rights have to some extent worked," he wrote in a commentary published Sunday. He also credited the Chinese government's imposition of the technology export restrictions late last month with having led to a better outcome for Beijing.

Since the new limits were announced, ByteDance has discussed the potential sale in talks with both China's internet regulator and the Ministry of Commerce, according to people familiar with the talks.

Still, the forced sale of a piece of one of the world's hottest internet properties angered many in China, including Fang Xingdong, a former internet entrepreneur and founder of Beijing-based think tank China Labs, who described it in an interview Sunday as "daylight robbery."

The Chinese government hasn't commented on the latest iteration of the deal or Mr. Trump's endorsement of it. China's Ministry of Foreign Affairs and Ministry of Commerce didn't immediately respond to requests for comment.

The TikTok saga has rattled China's government and technology industry. The app's addictive content proved to be the perfect distraction for millions of people forced to stay home because of the coronavirus pandemic, turning it into the world's hottest new social media sensation this year.

Just as its popularity was peaking, it got drawn into geopolitical tensions between Washington and Beijing, with Mr. Trump threatening to block it in the U.S. on national security grounds -- unless it was sold to American buyers.

When China imposed the technology export restrictions, some analysts wondered whether a deal could be made that would satisfy both Washington and Beijing, not to mention ByteDance and any prospective American partners.

At stake was an app that has averaged roughly 7.6 million installations each month in the U.S. this year on Apple Inc.'s App Store and Alphabet Inc.'s Google Play store, with the peak of the frenzy coming in March, around the time of the start of the Covid-19 pandemic, according to data from Sensor Tower, an analytics firm.

The fight over TikTok served as a symbolic boon to China's tech industry in that it showed the country is capable of creating a global tech asset that became the envy of Silicon Valley, said Peter Fuhrman, the Shenzhen-based chairman and chief executive officer of China First Capital, an investment advisory firm.

"The bottom line of what this means for China tech is soft power. It's inspiration and affirmation that Chinese tech companies can achieve such heights," Mr. Fuhrman said.

Even so, analysts warned that the episode would likely encourage Chinese companies to direct their focus inward, rather than pursue global expansion, given the geopolitical headwinds -- a shift in mind-set that could have long-term implications for the Communist Party's goal of turning the country into a global internet power.

TikTok's troubles are likely to reinforce a shift already under way in China to focus more heavily on developing the country's domestic market, in part as a response to a more hostile political environment abroad.

"For Chinese firms to survive and expand, an important life skill they will need to know is how to deal with such robbery, which is essential to protect themselves," said Mr. Fang, the former entrepreneur.

Even if Chinese firms are forced to curb their overseas ambitions, there is still ample scope for expansion within China, said a senior executive at a Chinese technology giant, who declined to be named because of the sensitivity of the matter. Consumer demand in China's smaller cities is still strong and growing, the person said.

Some analysts were less sympathetic, describing the blowback against TikTok's global conquest as a natural response to Beijing's own actions to block Facebook Inc., Twitter Inc. and other U.S. technology firms.

By erecting a wall around its own internet and shutting out foreign companies through censorship and investment restrictions, said Hosuk Lee-Makiyama, director of the Brussels-based European Center for International Political Economy, Beijing opened its companies up to these geopolitical concerns.

"Mainland China is now finally realizing there is a cost to pay for the Balkanization it created," Mr. Lee-Makiyama said.

--Eva Xiao and Raffaele Huang contributed to this article.

Write to Liza Lin at Liza.Lin@wsj.com