Xiaomi Corp. is taking legal action against two U.S. agencies for including it in a list of companies with ties to the Communist China military - a decision seen as an attempt to finalize former President Donald Trump's trade war against China after four years, according to an analysis by The Tech Portal published Monday.

Xiaomi - a company which overtook Apple, Inc. as the third largest smartphone manufacturer last year - was one of nine companies included on the list by the former president's administration. "Now, it has become one of the first to act against this label," The Tech Portal said.

The electronics company filed a lawsuit against the U.S. Department of Defense and the U.S. Department of Treasury for causing "irreparable harm" to its business.

Xiaomi was added to the defense department's list mid-January. It effectively means the U.S. considers Xiaomi works with the China military and uses espionage to procure advanced technologies for its benefit.

Xiaomi said the adding of the company to the list had caused "immediate and irreparable harm" and effectively cut it off from access to U.S capital markets. Xiaomi said the departments' actions had interfered with its business relationships and its ability to expand.

Xiaomi alleged its reputation and goodwill with consumers and business partners in the U.S. and the rest of the world was tarnished.

Xiaomi said its inclusion was "factually incorrect and has deprived it of legal due process. With a view to protecting the interests of the global users, partners, employees and shareholders it has pleaded to the courts to declare the decision illegal and that it be reversed."

"The company confirms that it is not owned, controlled, or affiliated with the Chinese military and is not a Communist China military company defined under the National Defense Authorization Act," Xiaomi said.

Companies on the list are subject to the executive order issued by former President Donald Trump in November. American investors and companies are prohibited from trading and investing in these companies which have been deemed to be a threat to the country's national security.

Market participants holding Xiaomi securities and derivatives will be forced to divest their holdings.

In its complaint, Xiaomi said that the U.S. departments did not provide any reasonable explanations for why it was added to the list.

Xiaomi wouldn't be "subject to these harms" were it not for the respondents' "unlawful designation of Xiaomi as a Communist China military company and the resulting restrictions under executive order," the company said.

Xiaomi said more than 75% of its voting shares were held by its joint founders Bin Lin and Lei Jun. The majority of the company's shareholders are American companies - including The Vanguard Group and Blackrock Group.