New downloads of the popular video-sharing app TikTok would be banned from midnight Sunday unless a court blocks the order by President Donald Trump, who has cited national security concerns

A federal judge readied a crucial decision Sunday on whether to allow or block a Trump administration ban on downloads of the popular video-sharing app TikTok.

US District Judge Carl Nichols, who has promised to rule on a TikTok request to block the president's order before it takes effect at 11:59 pm Sunday (0359 GMT Monday), heard arguments on the free-speech and implications of the Trump ban on the Chinese-owned app in a rare Sunday telephone hearing.

TikTok lawyer John Hall said a ban would be "punitive" and close off a public forum used by tens of millions of Americans.

In a written brief filed ahead of the hearing, TikTok lawyers said the ban was "arbitrary and capricious" and "would undermine data security" by blocking updates and fixes to the app used by some 100 million Americans.

The company also said the ban was unnecessary because negotiations were already underway to restructure the ownership of TikTok to address national security issues raised by the administration.

TikTok said the ban is not simply a business restriction but would "prohibit core constitutionally protected speech: videos composed by millions of Americans containing a vast array of individual expression, ranging from art to political speech."

Government lawyers argued the president has a right to take national security actions, and said the ban was needed because of TikTok's links to the Chinese government through its parent firm ByteDance.

A government brief called ByteDance "a mouthpiece" for the Chinese Communist Party and said it was "committed to promoting the CCP's agenda and messaging."

"The president determined that (China's) ability to control this data presented an unacceptable threat to the United States's national security and foreign policy," the government argued in its filing.

Even with Carlson's ruling apparently imminent, the drama could continue if either side chooses to appeal or seek an emergency order from a higher court.

The US administration argued that TikTok poses a national security risk because of links of its parent firm ByteDance to the Beijing government

Implications for internet

TikTok filed the case in the US capital in response to an order this month by Trump. The company's lawyers claimed that even a temporary ban would "inflict devastating and irreparable harm" on the service by damaging its reputation and harming its commercial ties.

An amicus brief filed by Netchoice, a trade group which includes Google, Facebook and Twitter, said a ban could have important implications for the global internet.

"The government's actions are unprecedented in scope," the group said in its filing.

A ban would "also create a dangerous precedent," the brief said.

"The prohibition on any use of TikTok code by US developers for any purpose is effectively a ban on the building blocks of digital free expression."

The trade group said a TikTok ban may be cited by China or other countries "as justification for banning or restricting the activities of US internet businesses, including US-based social media platforms."

Earlier this month, Trump cited national security concerns and issued orders to ban both TikTok and the popular Chinese app WeChat, which has been put on hold in a separate court case in California.

But the TikTok order stops short of a full ban until November 12, giving parent firm ByteDance time to conclude a deal to transfer ownership of the app.

A tentative deal unveiled last weekend would make Silicon Valley giant Oracle the technology partner for TikTok and a stakeholder in a new entity to be known as TikTok Global.