US President Donald Trump says he would approve of Microsoft or another major US company buying the US arm of the social media app TikTok, while continuing to threaten a ban if an acquisition deal is not reached by September 15.

Trump told reporters on Monday in the White House that, without a sale to a “secure” US company, TikTok “will be out of business in the United States”.

The president also insisted the deal should lead to a financial windfall for the US Treasury, without offering more details.

Commenting on TikTok, which is owned by Beijing-based ByteDance, Trump conceded the “brand is hot” and that it was a “great asset” but also warned the value of the product was dependent on it having access to the US market.

TikTok allows users to create short videos – often with some basic effects and music – and has become increasingly popular, particularly among a younger demographic.

The US government alleges TikTok is a security threat and the country’s military has already banned its use.

India was the country with the most downloads of the app until it was banned by the government amid frictions with China.

The US is the second-biggest market.

Microsoft confirmed on Sunday it was in talks for TikTok, following a conversation between Trump and its chief executive, Satya Nadella.

The company announced its proposal includes storing users’ data in the US.

Seattle-based Microsoft said it aims to complete the deal by September 15, for operations in the US, Canada, Australia, and New Zealand.

The company could bring in other investors as minority partners.

Secretary of State Mike Pompeo on Sunday accused Chinese software companies of “feeding data directly to the Chinese Communist Party”.