The U.S Department of Defense will remove China's Xiaomi Corp from a government blacklist, a court filing showed, clearing the way for any future American investment in the smartphone maker.

The filing stated that the two parties would agree to resolve their ongoing litigation without further contest, bringing to an end a brief and controversial spat between the hardware company and Washington.

Xiaomi did not immediately respond to a Reuters request for comment.

Earlier this year the U.S. Department of Defense, under the Trump administration, designated the firm as having ties to China's military and placed it on a list that would restrict U.S. investment in the company.

Xiaomi quickly responded by filing a lawsuit against the U.S. government, calling its placement "unlawful and unconstitutional" and denying any ties to China's military.

In March, under the new Biden administration, a federal judge temporarily blocked enforcement of the blacklisting.

Shares in Xiaomi rose over 6% in Hong Kong as news of the decision spread.

(Reporting by Aakriti Bhalla in Bengaluru and Josh Horwitz in Shanghai; Editing by Christopher Cushing & Shri Navaratnam) ((Aakriti.Bhalla@thomsonreuters.com;))