(Bloomberg) -- Erich Andersen, the US-based general counsel for TikTok and its Chinese parent company ByteDance Ltd., is stepping down from that role, the social media app said.

Andersen, who was a key executive responsible for convincing the US government that the company was doing enough to stave off national security concerns about its connections to China, will leave the role in June. He’ll remain as “special counsel to the company,” according to a TikTok statement on Friday. “His decision to step down as general counsel was entirely his own,” said Jodi Seth, a spokesperson for TikTok.

The move comes days after President Joe Biden signed into law a bill that threatens TikTok’s existence in the US, requiring ByteDance to either divest its stake in the app or see it banned. The companies are expected to wage a legal battle to try to overturn or delay enforcement of the legislation.

The company had been preparing to remove Andersen from his role as general counsel following the advancement in US Congress of the legislation to force a TikTok divestment or ban, people familiar with the matter told Bloomberg on April 20. TikTok denied that the company was planning to remove Andersen.

In his new role, Andersen will focus on the effort to overturn the legislation in the US and “other pressing legal matters,” the company said.

“It was a difficult decision to step down after so many years in this role,” Andersen said in Friday’s statement. “I’m grateful to my talented global legal team, which has successfully faced every new challenge with incredible grit and maturity.”

Read More: TikTok to Remove Executive Tasked With Fending Off US Claims

Andersen oversaw negotiations with the Committee on Foreign Investment in the United States, which was reviewing national security concerns regarding TikTok, its parent company and the potential for influence from the Chinese government. Those efforts dragged on for years, and TikTok ultimately failed to demonstrate that the $2 billion-plus it is spending on a security plan to protect US users’ data was enough to reach a deal.

Meanwhile, lawmakers grew impatient and acted on their worries about the potential for China, via ByetDance, to get its hands on sensitive user data or influence Americans’ social media feeds. TikTok’s parent spent $2.7 million on lobbying in the first quarter of this year on the heels of a record $8.7 million in 2023. But ultimately, the historic divest-or-ban bill was signed into law.

In an internal memo to employees reviewed by Bloomberg, Andersen said he initiated conversations about transitioning out of his role. “It was entirely my decision to do so, and it was not an easy one,” Andersen wrote. “But as I started to reflect some months ago on the stresses of the last few years and the new generation of challenges that lie ahead, I decided that the time was right to pass the baton to a new leader.”

(Updates with comment from TikTok spokesperson in second paragraph.)

©2024 Bloomberg L.P.