The CEO of TikTok has quit after only four months in the job, as the Chinese social media company faces a political fight for its life in the US.

TikTok is facing a Donald Trump administration executive order which will effectively ban the app in the US unless it finds a buyer within 90 days, with the platform’s parent company ByteDance announcing this week that it intends to sue the US government over the edict.

Now TikTok CEO Kevin Mayer, a former Disney executive, has announced that he has quit, sending a resignation letter to staff on Thursday, as the Wall Street Journal reported.

“In recent weeks, as the political environment has sharply changed, I have done significant reflection on what the corporate structural changes will require, and what it means for the global role I signed up for,” Mayer said in the letter.

“Against this backdrop, and as we expect to reach a resolution very soon, it is with a heavy heart that I wanted to let you all know that I have decided to leave the company.”

Mayer said there would be no changes for TikTok users going forward.

“As we look to the next phase of this company, there is no doubt that the future is incredibly bright,” he said. “For our users, any potential structural changes should not affect their experience, and I strongly believe that our community will be more creative and diverse than ever.

“The platform will continue to provide our global community with an amazing and integrated experience as it does today. Similarly, from an employee perspective, I believe that the vast majority of work will be unchanged.”

A spokesperson for TikTok said the company understands Mayer’s decision to step down.

“We appreciate that the political dynamics of the last few months have significantly changed what the scope of Kevin’s role would be going forward, and fully respect his decision,” the spokesperson said.

“We thank him for his time at the company and wish him well.”

It comes just days after TikTok announced it plans to sue the US government over the Trump administration’s executive order, which bans Americans from doing business with ByteDance in 90 days.

The order claims that TikTok collects “vast swathes of information” which “threatens to allow the Chinese Communist Party access to Americans’ personal and proprietary information”.

In a blog post, the company said it disagreed with these claims and that it has “taken extraordinary measures to protect the privacy and security of TikTok’s US user data”.

“We do not take suing the government lightly,” the company said. “But with the executive order threatening to bring a ban on our US operations...we simply have no choice”.

In the statement, TikTok said it was “shocked” by the executive order, which it said was issued “without any due process”.

Mayer’s resignation also comes just a week after it was revealed that Facebook CEO Mark Zuckerberg had been campaigning publicly and privately against TikTok, raising national security concerns with President Donald Trump and a range of senators and regulators.

Several prominent companies have thrown their hats in the ring to potentially acquire TikTok’s operations in the US, Canada, Australia and New Zealand.

Microsoft was first to confirm it was interested in buying the social media platform, while Twitter and Oracle have also reportedly shown interest.

Microsoft’s bid was bolstered this week when Walmart confirmed it was also involved in the deal, saying it was “confident” it would satisfy concerns of US regulators and users.

Such a deal would allow Microsoft to use Walmart’s online store to sell items on TikTok, something which is already commonplace on Instagram and Facebook, as Forbes reported. It would also help Walmart take on its arch rival Amazon with more of an online platform.