Earlier this month, Microsoft signaled its interest in purchasing some of ByteDance’s TikTok operations. That interest went as far as Microsoft CEO Satya Nadella speaking to President Donald Trump about the deal. It now seems Redmond was sniffing around TikTok even before involving the president.

New court documents show Microsoft went as close to a deal as signing a “nonbinding letter of intent” with ByteDance. This essentially means Microsoft agreed with the Chinese company to purchase TikTok.

A nonbinding letter of intent is an agreement in place before due. As it suggests, it does not commit a company to a purchase but does mean talks have gone far. In the case of Microsoft and ByteDance, documents show an agreement was in place from July 30.

The letter states Microsoft is “contemplating that, among other things, Microsoft could acquire the US TikTok business and could serve as the trusted technology partner for TikTok’s US business.”

This means Microsoft was already in talks with ByteDance long before Trump became involved by seeking to ban TikTok from the United States.

Trump’s Involvement

The president has been targeting Chinese companies who he believes work with the Chinese government to provide US state secrets.

An executive order stops ByteDance from handling any transactions in the United States. This order will come into effect within the next 45 days and could mean TikTok leaves the market in the country.

Microsoft’s interest is thought to be in TikTok operations in the US, Canada, Australia, and New Zealand. The company is reportedly facing competition from Oracle, which has also been talking to ByteDance. Twitter is also looking at the popular video social network.

Knowledge of Microsoft and ByteDance’s advancing negotiations comes from a lawsuit filed by TikTok. The company is challenging Trump’s executive order. According to the company, the nonbinding agreement with Microsoft means an acquisition could happen, thus the company cannot be subject to the executive order.

Neither Microsoft nor ByteDance has responded to the latest information.