| Credit: Rafael Henrique/SOPA Images/LightRocket via Getty

TikTok's days in the United States may be numbered.

In a long-threatened move likely to draw legal scrutiny and possible retaliation from China, President Donald Trump on Thursday issued an executive order that would effectively ban the popular social media app from operating in the U.S. in 45 days if it is not sold — a move TikTok said "shocked" them.

"We are shocked by the recent executive order, which was issued without any due process," TikTok said in a statement, according to Fox Business. "For nearly a year, we have sought to engage with the U.S. government in good faith to provide a constructive solution to the concerns that have been expressed."

TikTok's statement continued: "The Administration paid no attention to facts, dictated terms of an agreement without going through standard legal processes, and tried to insert itself into negotiations between private businesses."

Citing growing security concerns and a pattern of censorship, Trump's order prohibits "any transaction" with ByteDance Ltd., the Beijing tech company that owns the social media platform, beginning 45 days from the order.

"These risks are real," the president said in his order, which essentially sets a countdown for ByteDance to divest TikTok's American operations to another company such as Microsoft.

Trump issued a similar order and similar deadline for another Chinese-owned app, WeChat.

TikTok, which allows users to share short videos featuring everything from dances and lip-syncing videos to viral jokes, was launched in 2016.

It has produced a new wave of social-media stars, including Charli D'Amelio, Addison Rae and Bryce Hall — all of whom have several million followers on the app.

At the same time, TikTok has become increasingly controversial in some circles, particularly over questions about how it handles user data and its Chinese connections. Congress blocked its use on federal devices and former Vice President Joe Biden's campaign made a similar move.

Others say the focus on TikTok, rather than larger social media companies, is hypocritical and that a widespread ban would be inflammatory.

Following news of the potential ban, singer Jason Derulo, who has become a standout on the app with over 30 million followers, told Page Six, "I don’t believe that will be the case, honestly, but that would be a sad day for a lot of people, including myself. I just have a lot of fun on the app, so it would be pretty sad, but I don’t think it’s going to happen."

In anticipation of a ban, which has been teased by Trump administration officials for weeks, TikTok stars Josh Richards, Noah Beck and Griffin Johnson joined the L.A.-based music video social media app Triller.

Though TikTok has maintained that it stores all U.S. user data in the U.S., Secretary of State Mike Pompeo said in early July that the administration was considering banning it, along with other Chinese social media apps, due to national security concerns.

A TikTok spokesperson told CBS News at the time that the company has never provided user data to the Chinese government and would not do so if asked.

In their statement on Friday, TikTok threatened legal action over Trump's order, saying it "sets a dangerous precedent for the concept of free expression and open markets," according to Fox Business, adding that the company "will pursue all remedies available to us in order to ensure that the rule of law is not discarded and that our company and our users are treated fairly – if not by the Administration, then by the U.S. courts."