In a late Sunday order, a US federal judge halted the Trump administration’s order that banned downloads of the popular video app TikTok. District Judge Carl Nichols issued a temporary injunction at the request of TikTok, halting the politically charged ban, AFP reported.

The Trump administration order had sought to ban new downloads of TikTok from midnight (0400 GMT Monday). It, however, allowed the use of the app until November 12, when all usage would be blocked in the country.

The Trump administration has termed TikTok as a national security threat, as it is owned by Chinese firm ByteDance, which it accuses of having ties with China’s Communist Party. 

The judge halted the ban just hours before it was to go into effect. He, however,  denied TikTok’s request to suspend the November 12 ban.

The opinion was sealed, so no reason for the decision was released in a one-page order by the court in Washington.

Nichols heard arguments on the free-speech and national security 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.

Silicon Valley giant Oracle will reportedly assume the ownership of TikTok.

The government lawyers argued on Sunday that 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.

Earlier this month, Trump cited national security concerns and issued orders to ban both TikTok and the popular Chinese app WeChat.