A federal judge listened to arguments in a rare Sunday hearing ahead of making a crucial decision on whether to allow or block a Trump administration ban on downloads of the popular video-sharing app TikTok.

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 national security implications of the Trump ban on the Chinese-owned app.

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 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."

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
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 GETTY IMAGES / MARIO TAMA

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 "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' national security and foreign policy," the government argued in its filing.

TikTok filed the case in response to Trump order, saying even a temporary ban would "inflict devastating and irreparable harm" on the service.

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.