A judge has blocked a US government attempt to ban the Chinese messaging and payments app, WeChat.
US Magistrate Judge Laurel Beeler said the ban raised serious questions related to the constitution's first amendment, guaranteeing free speech.
The Department of Commerce had announced a bar on WeChat appearing in US app stores from Sunday, effectively shutting it down.
The Trump administration has alleged it threatens national security.
It says the app could pass user data to the Chinese government.
Both WeChat and China have strongly denied the claim. Tencent, the conglomerate that owns WeChat, had previously described the US ban as "unfortunate".
The ruling comes just after TikTok, which was also named in the Department of Commerce order, reached a deal with US firms Oracle and Walmart to hopefully allow them to keep operating.
What happened in court?
The case came to court after a group of US WeChat users challenged President Donald Trump's executive order that sought to shut WeChat down in the country.
The US Justice Department argued that blocking the executive order would "frustrate and displace the president's determination of how best to address threats to national security".
However Judge Beeler, sitting in San Francisco, noted that "while the general evidence about the threat to national security related to China (regarding technology and mobile technology) is considerable, the specific evidence about WeChat is modest".
Why does the US want the apps banned?
In a statement, the US Department of Commerce Secretary Wilbur Ross said the decision to block the app was taken "to combat China's malicious collection of American citizens' personal data".
The department said WeChat collected "vast swathes of data from users, including network activity, location data, and browsing and search histories".
Friday's statement from the commerce department said the governing Chinese Communist Party "has demonstrated the means and motives to use these apps to threaten the national security, foreign policy, and the economy of the US".
Tencent, which owns WeChat, has said that messages on its app are private.
More than just an app
WeChat is used by nearly 20 million people in the US - and pretty much exclusively by the Chinese and South East Asian diaspora.
It is hard to describe how important it is in people's lives. It is not just an app, for many people WeChat IS their mobile phone. It is like Amazon, Facebook, WhatsApp, Tinder and much more, rolled into one.
One Malaysian expat told me she would "cry" if the app was blocked. She told me her family had spent time showing her elderly mother how to use WeChat - and worried she would be unable to communicate with her if the ban came into force.
Interestingly though, we have not heard much from WeChat's owners - Tencent. Why? Well, Tencent is one of the biggest games companies in the world - and has a huge market in America. If President Trump were to go further and target that section of the business it would really sting.
What is WeChat?
WeChat was set up in 2011. It is a multi-purpose app allowing users to send messages, make mobile payments and use local services. It has been described as an "app for everything" in China and has more than one billion monthly users.
Like all Chinese social media platforms, WeChat must censor content the government deems illegal. In March, a report said WeChat was censoring key words about the coronavirus outbreak from as early as 1 January.
But WeChat insists encryption means others cannot "snoop" on your messages, and that content such as text, audio and images are not stored on its servers - and are deleted once all intended recipients have read them.