With deadlines looming, the U.S. is fighting to impose President Donald Trump’s ban on the viral video-sharing app TikTok.

A federal judge in Washington scheduled a Sunday morning hearing on TikTok’s request to halt the ban, hours before it’s set to go into effect. The U.S. on Friday filed a sealed motion opposing TikTok’s effort.

ByteDance Ltd., TikTok’s Chinese owner, sought the court action even as it pursues approvals for the sale of a stake in its U.S. operations to Oracle Corp. and Walmart Inc. under pressure from the president. The Trump administration on Aug. 6 announced that it would ban the app, used regularly by 19 million Americans, from U.S. stores over national security concerns. The judge had given the U.S. until 2:30 p.m. Friday to delay the ban or fight TikTok’s request.

Both TikTok and WeChat, which is owned by China’s Tencent Holdings Ltd., have been labeled national-security threats by the Trump administration, which is seeking to stop their use in the U.S. -- or, in TikTok’s case, force a sale to U.S. companies -- on the grounds they could allow China’s government to gain access to the personal data of millions of Americans.

The U.S. gave notice Friday that it wanted to file classified information in the WeChat case. In defending the TikTok ban, it said it wants to file its response under seal because the document includes “confidential business information” on the app that ByteDance has shared with the Commerce Department.

The TikTok ban, effective at 11:59 p.m. on Sept. 27, would remove TikTok from the app stores run by Apple Inc. and Google’s Android, the most widely used marketplaces for downloadable apps. People who don’t yet have the app wouldn’t be able to get it, and those who already have it wouldn’t have access to updates needed to ensure its safe and smooth operation. Over time, it would become useless.

The ban, proclaimed in an Aug. 6 executive order by the president, is part of a wider effort by the administration to take a hard line against Beijing, as Trump bets that a tough approach will help him win re-election.