ByteDance Ltd. is butting up against a long-awaited deadline that would subject the Chinese internet giant to possible Trump administration penalties if it can’t clinch a deal for the U.S. operations of its widely used video-sharing app, TikTok.

The Beijing-based company has asked the U.S. government to extend a Thursday deadline for ByteDance to divest its TikTok business in the U.S. President Donald Trump in August demanded the app be spun off, citing concerns about the security of American users’ personal information, and gave the company a 90-day timeline to complete a transaction.

That window is now closing, and while TikTok has struck an agreement to sell part of its business to Oracle Corp. and Walmart Inc., the deal hasn’t been finalized. ByteDance filed a petition in the U.S. Court of Appeals for the D.C. Circuit on Tuesday night, requesting the court step in to prevent the Treasury Department’s forced sale.

What TikTok is really asking for is more time.

“We remain committed to working with the administration — as we have all along — to resolve the issues it has raised, but our legal challenge today is a protection to ensure these discussions can take place,” a TikTok spokeswoman said in a statement. The petition also states that TikTok is committed to completing a deal, and confirmed that it most recently submitted a proposal for review on Nov. 6.

Thursday’s deadline is the latest checkpoint in what has been a long, complicated sale process, which may get more confusing as President-elect Joe Biden comes into power.

Trump has made the fight over TikTok a central front in a broader trade war with China, in particular an effort to crack down on the growing influence of China’s technology industry in the U.S. Trump first ordered a TikTok sale in August, and has threatened to ban the app if ByteDance couldn’t reach an agreement. That proposed ban has since been delayed twice — most recently on Oct. 30, when a Pennsylvania judge issued a temporary injunction in response to a lawsuit filed by a group of TikTok users who make their living via the app.

But the Nov. 12 deadline to finalize a sale is still intact, and poses a significant threat to ByteDance, one of the world’s most valuable private companies. TikTok is one of the most popular apps in the world — with more than 100 million U.S. users — and is also ByteDance’s most important service outside of China. The company and its investors are desperate to finish a deal to avoid a ban in what has been a very valuable market for other social media apps, like Facebook Inc.’s Instagram and Snap Inc.’s Snapchat.

Trump gave his blessing in mid-September to a preliminary plan in which ByteDance would sell part of TikTok to Oracle and Walmart, creating a new independent company called TikTok Global. But that deal has been stuck in limbo for weeks, and was quickly overshadowed by the U.S. election. ByteDance reiterated that its most recent proposal would put American investors in charge of data and content moderation for U.S. users, according to Tuesday’s petition.

The way the original order was worded appears to require a divestment from ByteDance to be in place by the deadline — not just an agreement. If the government does reach an accord with the company, it could exercise discretion around enforcement timing, said Aimen Mir, a partner at Freshfields Bruckhaus Deringer and a former deputy assistant secretary for investment security at Treasury, where he ran reviews for the Committee on Foreign Investment in the U.S.

“Usually when there is extended silence from Cfius, it suggests there’s no clear consensus within government on what the next step would be, but this has been an atypical case for awhile,” Mir said.

It’s unclear what would happen if a deal isn’t finalized by Thursday. If the deadline comes and goes without an extension, court relief or an agreement between the company and the government, Mir said the Justice Department would have to go to court and seek enforcement of the divestiture order.

Trump’s executive order from August doesn’t stipulate a clear punishment for failure to divest, but says that “the Attorney General is authorized to take any steps necessary to enforce this order.”

“There could be fines, or it could be as draconian as a ban if the administration wanted to go that far,” said Carl Tobias, a law professor at the University of Richmond. “But the government still has until midnight on Nov. 12 to issue an extension, which is a plausible scenario.”

This sale process was originally brought about because of national security concerns. The U.S. government is worried about ByteDance’s access to the personal data of U.S. citizens. Tuesday’s court filing included a detailed and previously undisclosed letter from U.S. officials that outlined those concerns.

Cfius, which is led by the Treasury Department and reviews foreign acquisition of American businesses, said in a July 30 letter that its security concerns were based on both classified and unclassified information. The letter cited the move by a ByteDance Chinese affiliate in 2017 to establish a Communist Party Committee in its governance structure, and pointed out that ByteDance also collaborates with public security bureaus across China. Cfius generally doesn’t confirm, deny or comment on its reviews.

“The Treasury Department remains focused on reaching a resolution of the national security risks arising from ByteDance’s acquisition of Musical.ly,” a Treasury spokeswoman said in a statement. “We have been clear with ByteDance regarding the steps necessary to achieve that resolution.” The Justice Department didn’t respond to a request for comment.

Trump’s order requiring the sale of TikTok underscored the aggressive stance his administration has taken toward Chinese investment in the U.S. Only seven foreign acquisitions of American companies have been blocked or unwound by U.S. presidents since 1990, and Trump is responsible for four of them.

Now, the TikTok deal, once a priority for the administration, has in recent weeks taken on less urgency as Trump turned his focus to his bid for re-election and, since last week, challenging the outcome of the Nov. 3 vote.