By Georgia Wells and Aaron Tilley

Oracle Corp. won the bidding for the U.S. operations of the video-sharing app TikTok, people familiar with the matter said, beating out Microsoft Corp. in a high-profile deal to salvage a social-media sensation that has been caught in the middle of a geopolitical standoff.

Oracle is set to be announced as TikTok's "trusted tech partner" in the U.S., and the deal is likely not to be structured as an outright sale, the people said.

The next step is for the White House and the Committee on Foreign Investment in the U.S. to approve the deal, said one of the people, adding that the participants believe it satisfies the concerns around data security that have been previously raised by the U.S. government.

On Monday, Treasury Secretary Steven Mnuchin confirmed that his office received a bid proposal from Oracle for TikTok's operations over the weekend and said that the Treasury-led Committee on Foreign Investment in the U.S. would review it this week.

"We will be reviewing that at the CFIUS committee this week and then will be making a recommendation to the president and reviewing it with him," Mr. Mnuchin said on CNBC. "From our standpoint, we'll need to make sure that the code is, one, secure, Americans' data is secure, that the phones are secure and we'll be looking to have discussions with Oracle over the next few days with our technical teams."

The move by TikTok's parent company, Beijing-based ByteDance Ltd., comes days after the Chinese government threw negotiations into doubt when it issued new export restrictions late last month on the kind of artificial intelligence technology TikTok uses. The algorithms, which determine the videos served to users and are seen as TikTok's secret sauce, were considered part of the deal negotiations up until the Chinese policy change raising questions among the parties involved in negotiations over how to value the social-media business.

The structure of Oracle's deal wasn't immediately known, including whether it includes transfer of the algorithms.

Two people familiar with the Oracle deal said it was more appropriate to call it a partnership, rather than an acquisition, suggesting that there wasn't an exchange of significant assets. At least some of ByteDance's existing investors, including U.S. investment firms Sequoia Capital and General Atlantic, will get stakes in the venture as part of the deal, said people familiar with the matter.

The possibility that a deal might not involve an outright sale was previously reported by The Wall Street Journal.

President Trump has said repeatedly that he would shut down TikTok in the U.S. if it isn't sold to an American company by Sept. 15, though it isn't clear if that is the operative deadline. In an Aug. 6 executive order, the White House gave ByteDance a 45-day deadline before it would ban the app, which the Trump administration says poses an economic and national-security threat to U.S. interests, if it isn't sold to a U.S. buyer. That gives the parties until Sept. 20 to seal a deal.

Microsoft, which had teamed up with Walmart Inc., earlier Sunday said in a statement that it was notified earlier in the day of the decision by ByteDance.

"We are confident our proposal would have been good for TikTok's users, while protecting national security interests," the statement said. "To do this, we would have made significant changes to ensure the service met the highest standards for security, privacy, online safety, and combatting disinformation, and we made these principles clear in our August statement."

In a statement late Sunday, Walmart suggested it is considering joining the Oracle group, saying it is continuing "discussions with ByteDance leadership and other interested parties."

While China's recently announced trade restrictions made acquiring TikTok's algorithm tricky, Microsoft remained committed to acquiring the app's powerful suggestion algorithms, said a person familiar with the matter. Without outright purchase of the algorithms, Microsoft wouldn't be able to follow through with its stated commitment to national security issues.

Oracle's interest in TikTok is primarily driven by kickstarting its fledgling cloud-computing business, which remains far behind market leaders Amazon.com Inc. and Microsoft, people familiar with the matter said.

Microsoft's plans were more ambitious than Oracle, said one person. Owning TikTok would help Microsoft have more presence among everyday consumers, an area it had mostly abandoned to chase after corporate users with the exception of its Xbox gaming business. TikTok would also give Microsoft a treasure trove of data on young and mostly female users, an area it doesn't have much insight into now.

The New York Times reported earlier that Microsoft had been notified of the ByteDance decision.

TikTok has soared to around 100 million monthly users in the U.S., from about 11 million in early 2018, and they are considered among the most lucrative in the app's global user base of about 689 million, though the app still loses money.

Oracle wasn't as obvious a winner in the race for TikTok as Microsoft. While both tech companies have sizable cloud-computing operations and technical capabilities, Oracle is mainly focused on serving business clients and has virtually no experience running a social-media platform or other major consumer-facing business. Microsoft is an even bigger player in business computing but also owns the LinkedIn social-media site and the Xbox videogame business. It also is a much bigger company and has about $136 billion of cash, some three times what Oracle has on hand.

President Trump in mid-August voiced support for a potential Oracle bid. "Well I think Oracle is a great company and I think its owner is a tremendous guy, a tremendous person. I think that Oracle would be certainly somebody that could handle it," the president said when asked about Oracle's potential interest.

Oracle co-founder Larry Ellison earlier this year threw a fundraiser at his house for the president. Chief Executive Safra Catz also worked on the executive committee for the Trump transition team in 2016.

The Trump administration has pushed for a sale for months, expressing concern that TikTok could pass on data it collects from Americans streaming videos to China's authoritarian government. TikTok has said it hasn't been asked to share data with the Chinese government and wouldn't do so if asked.

The White House's role in bringing the sale about has little, if any, precedent in the annals of American deal making.

Chinese-U.S. tensions have derailed other high-profile tech deals. The Trump administration blocked Broadcom Ltd.'s $117 billion hostile bid for Qualcomm Inc. over concerns the deal would weaken the U.S. chip maker and cede market power to China. Months later Chinese antitrust regulators failed to approve Qualcomm's bid to buy Dutch chip maker NXP Semiconductors NV.

But those deals generally didn't gain the widespread attention the TikTok talks garnered with its millions of loyal users worried about the future of the app.

Miriam Gottfried and Rolfe Winkler contributed to this article.

Write to Georgia Wells at Georgia.Wells@wsj.com and Aaron Tilley at aaron.tilley@wsj.com