Donald Trump’s plan to block downloads of the Chinese messaging and payment app WeChat has been blocked by a federal judge in California on first amendment grounds.
The ruling put a temporary block on the president’s executive order which would have effectively banned the app on Sunday, despite Mr Trump and his administration describing it as a national security threat.
Judge Laurel Beeler said the government’s actions would affect WeChat users’ first amendment rights – as a ban on the app removes their platform for communication.
WeChat is popular with many Chinese-speaking Americans and serves as a lifeline to friends, family, customers and business contacts in China.
It is owned by Chinese tech giant Tencent.
A preliminary injunction against the US government’s ban was brought by a non-profit organisation called the US WeChat Users Alliance, which says it has no connection to Tencent.
The group, which features prominent Chinese-American lawyers, said the executive order risked infringing the constitutional rights of the app’s 19 million regular users in the country.
According to the US government, WeChat posed a national security threat by providing the Chinese Communist Party with the ability to maliciously collect data on American citizens.
The Department of Justice claimed this data included “network activity, location data, and browsing and search histories”, data which social media apps typically collect on their users, although they are not typically based in China.
Tencent denies the allegations, and says that messages on its app are private.
The ruling follows Donald Trump saying he has given his “blessing” to a proposed deal that could prevent another Chinese-owned app, TikTok, from being banned by the same executive order.
He told reporters at the White House he is backing a deal with Oracle and Walmart that would create a new company to oversee TikTok’s US operations.
Mr Trump said the new company would be “totally controlled by Oracle and Walmart”.
People in the US had been set to be banned from downloading the video-sharing app on Sunday, following White House concerns about the security of user data.
An earlier statement from the US commerce department said: “The Chinese Communist Party (CCP) has demonstrated the means and motives to use these apps to threaten the national security, foreign policy, and the economy of the US.”
It added that the apps posed “unacceptable risks” to national security.
But the president has now said he approves the deal “in concept” and the security will be “100%”, adding: “I have given the deal my blessing.”