Two women walk past a Xiaomi store in Beijing on Jan 15, 2021. (GREG BAKER / AFP)

Xiaomi Corp and the US government have reached an agreement to set aside a Trump administration blacklisting that could have restricted American investment in the Chinese smartphone maker.

The Chinese smartphone giant had sued the government earlier this year, after the US Defense Department under former President Donald Trump issued an order designating the firm as a Chinese military company, which would have led to a de-listing from US exchanges and deletion from global benchmark indexes. 

Xiaomi, which makes robot vacuum cleaners, electric bikes and wearable devices alongside smartphones, had been an unexpected target for the Trump administration

The US Defense Department has now agreed that a final order vacating the designation “would be appropriate,” according to a filing to the US courts Tuesday.

Xiaomi didn’t immediately reply to a request for comment. Pentagon representatives weren’t immediately available for comment after normal hours. Shares of Xiaomi rallied as much as 6.7 percent in Hong Kong trading Wednesday.

ALSO READ: US court blocks Trump ban on phone maker

“The Parties have agreed upon a path forward that would resolve this litigation without the need for contested briefing,” according to the filing. The parties involved are negotiating over specific terms and will file a separate joint proposal before May 20.

Xiaomi, which makes robot vacuum cleaners, electric bikes and wearable devices alongside smartphones, had been an unexpected target for the Trump administration. Co-founded by billionaire entrepreneur Lei Jun more than 10 years ago, with US chipmaker Qualcomm Inc as one of the earliest investors, the company has insisted it’s not owned or controlled by the Chinese military.

The agreement comes after a US court in March sided with Xiaomi in the lawsuit and placed a temporary halt on the ban. US District Judge Rudolph Contreras said at the time Xiaomi was likely to win a full reversal of the ban as the litigation unfolds and issued an initial injunction to prevent the company from suffering “irreparable harm.”

READ MORE: Beijing opposes US' repeated sanctions against Chinese firms