In blocking the Trump administration’s move to shut TikTok out of U.S. app stores, a federal judge in Washington rejected a broad assertion of presidential power by the U.S. Justice Department while acknowledging the potential national security risks posed by the wildly popular Chinese-owned video app.

U.S. District Judge Carl Nichols, the most recent Trump appointee to federal trial court in Washington, handed down a preliminary injunction Sunday preventing the administration from going through with the ban, which had been set to take effect at midnight. On Monday, Nichols unsealed his full opinion, providing the legal reasoning behind the reprieve from Trump’s bid to ban the viral video app.