US President Donald Trump has expressed his approval of a deal that would allow Chinese-owned video-sharing app TikTok to continue operating in the US.
Mr Trump told reporters he had given his "blessing" to a partnership between TikTok and US firms Oracle and Walmart.
The president had ordered the app to be banned in the US, citing national security concerns.
US security officials fear data collected by TikTok's owner may be handed to the Chinese government.
TikTok's owner, ByteDance, has denied accusations that it is controlled by or shares data with China's ruling Communist Party.
However, the TikTok deal does not affect a ban on the Chinese-owned messaging and payments app WeChat, which will no longer be available in US app stores from Sunday night.
Tencent, the conglomerate that owns WeChat, has described the US ban as "unfortunate".
On Saturday, Mr Trump said the deal would ensure the data of the estimated 100 million Americans who use the app was safe, telling reporters: "The security will be 100%."
"I have given the deal my blessing," Mr Trump said as he left the White House ahead of an election rally in North Carolina. "I approve the deal in concept."
TikTok and ByteDance both welcomed President Trump's approval of a proposed deal, which would still need to be signed off by the Chinese government.
TikTok said the deal would ensure US national security requirements were fully satisfied, while ByteDance said it was working to reach an agreement that was "in line with US and Chinese law" as soon as possible.
Vanessa Pappas, TikTok interim chief executive, said in a video posted on Saturday that the app was "here to stay" in the US.
President Trump's support for the deal comes days after his administration said it would bar people in the US from downloading TikTok through any app store from Sunday.
However, the US Commerce Department said it had now delayed this deadline for a week until 27 September in the "light of recent positive developments".
The row over TikTok comes at a time of heightened tensions between the Trump administration and the Chinese government over a number of issues, including trade disputes, protests in Hong Kong and Beijing's handling of the coronavirus outbreak.
What is the proposed deal?
The deal would see the establishment of a new company, dubbed TikTok Global. That company would be headquartered in the US, possibly in the state of Texas, with a majority of American directors, a US chief executive and a security expert on the board.
Oracle and Walmart are expected to take significant stakes in the company, and ByteDance has agreed to security safeguards on the data of US users. TikTok's data would be stored by Oracle, which would have the right to inspect its source code.
President Trump said the new TikTok company will be "totally controlled by Oracle and Walmart". But in a joint statement on Saturday, Oracle and Walmart said they were together investing to acquire 20% of the newly formed TikTok Global business.
Of that 20% stake, Oracle will take 12.5%, while Walmart will take 7.5%, reports say.
The deal will see TikTok Global become majority-owned by American investors, but Bytedance will retain a share of the US operation.
This falls somewhat short of President Trump's demand for an outright sale of TikTok's US arm to an American company. That was the intention of an executive order Mr Trump signed in August.
However, Mr Trump did say the deal would provide new jobs and tax revenue for the country.
In their statement, Oracle and Walmart said TikTok Global would create more than 25,000 new jobs and pay more than $5bn (£3.8bn) in tax in the US.
A deal, but not the one Trump had demanded
This is not the deal that Donald Trump had envisioned - he had wanted the US arm of the company to be sold.
That's not quite what's happening here.
This is more like a joint venture between three companies. Oracle's role is particularly important, acting as a "trusted partner" safeguarding the data of users.
But in the proposed deal TikTok's Chinese owner Bytedance would still own much of the new entity.
So what made Trump decide to approve it?
Well, he appears now to be satisfied that the security arrangements proposed. But it's more complex than that. The deal also proposes a $5bn education fund - and will reportedly create 25,000 US jobs.
This is not a done deal though, the Chinese government still has to approve it - and there's no guarantee that will happen.
What is TikTok?
TikTok is a video-sharing app. Users can post up to a minute of video and have access to a vast database of songs and filters.
They use the app to share 15-second videos that often involve lip-synching to songs, comedy routines and unusual editing tricks.
The app collects a huge amount of user data - including what videos people watch and comment on, location data, phone model and even how people type. But much of this data collection is similar to other social networks like Facebook.
The app is reported to have around 800 million active monthly users worldwide, most of whom are in the US and India.
India has already blocked TikTok as well as other Chinese apps. Australia, which has already banned Huawei and telecom equipment-maker ZTE, is also considering banning TikTok.