Bytedance has applied to the chinese government for permission to export its technology as the company races to finalise a deal and prevent its viral video app tiktok from being blocked in the us.

The social media group said on thursday it had applied to beijings municipal commerce bureau for the licence after authorities in august revised export controls to include the algorithms that power tiktok.

The change gave beijing more sway over any deal affecting tiktoks us operations, making the granting of an export licence potentially crucial to any final agreement.

Bytedance is negotiating with us groups oracle and walmart over a deal to satisfy demands by us president donald trump that the chinese company cede control of tiktoks us operations for national security reasons.

The parties are seeking to complete a deal prior to a proposed trump administration ban that would block downloads of tiktok in the us, which is due to take effect this sunday.

But bytedance and its us suitors have publicly disagreed on the final terms of a deal. disagreement has centred on who would own tiktok global, the new us-based company that would be created under the transaction, as well as who would control tiktoks algorithm.

Chinas commerce ministry confirmed onthursday that itsbeijing municipaloffice had received bytedances export licence application. spokesman gao feng said the application would be handled in accordance with laws and regulations.

Oncebytedancesapplication is accepted, guidelines state that initial approval should come within 30 working days and final approval 15 working days after regulators see the companys final export contract.

Editorials published by several chinese state media groups this week signalled beijing was reluctant to sign off on a deal that could put control of the short-video app in the hands of americans.

Bytedance has said the proposed deal would not involve the transfer of technology or source code, but that oracle would be able to review the latter. oracle and walmart have said that tiktok global would control all of the apps technology.

Luo zhiyu, a partner at beijing-based jingsh law firm, said that an export permit would be needed if tiktok global wanted to license or take ownership of bytedances technology.

But mr luo said an export licence may not be needed if bytedance wanted to send its source code to the us just so it could be reviewed by oracle.

Tiktok separately went to court in the us on wednesday in an attempt to prevent the trump administration from blocking downloads of the video-sharing app.

Nian liu contributed reporting from beijing.