Kevin Mayer, the chief executive officer of the Chinese-owned video app TikTok, said on Wednesday that he was resigning from the company, two months after his appointment, CNBC reported. Mayers had joined TikTok on June 1, after resigning from the Walt Disney Company.

Vanessa Pappas, general manager of TikTok in North America, will take over as the interim global head of the company, according to The New York Times.

His resignation came after United States President Donald Trump claimed the video app could be used to spy on Americans and ordered a crackdown on the Chinese-owned company. Trump has given TikTok time till mid-September to sell all its assets in the United States.

In a letter to his employees, Mayer said that a series of structural changes to TikTok prompted him to leave. “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 wrote. “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 added that he understood that the role he signed up for “will look very different” as a result of the US Administration’s action to push for a sell off of the American business.

In a statement, TikTok said: “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”.

Trump has repeatedly alleged that TikTok, which is owned by the Chinese internet giant ByteDance, poses a threat to national security because of Beijing’s influence. On August 6, he issued executive orders banning transactions with the video app within 45 days if the app did disinvest from US. A week later, he issued another order and gave the company the 90-day ultimatum to close such a deal.

TikTok has consistently denied the allegations and has maintained that the company had “taken extraordinary measures to protect the privacy and security of TikTok’s US user data”. On Monday, the Chinese video-sharing app sued the Trump administration, accusing it of depriving it of due process by forcing a sale on them.