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 Beijing-based smartphone giant had sued the government earlier this year , after the US Defence Department under former President Donald Trump issued an order designating the firm as a Communist Chinese military company, which would have led to a delisting from US exchanges and deletion from global benchmark indexes. The US Defence Department has now agreed that a final order vacating the designation “would be appropriate”, according to a filing to the US courts on Tuesday. Hong Kong-listed Xiaomi did not immediately reply to a request for comment. Pentagon representatives were not immediately available for comment after normal hours. Shares of Xiaomi rallied as much as 6.7 per cent in Hong Kong trading on Wednesday. “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. How Xiaomi rose to become China’s No 1 smartphone maker Co-founded by billionaire entrepreneur Lei Jun more than 10 years ago, with US chip technology company Qualcomm as one of the earliest investors, Xiaomi has insisted it is 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 that 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”. The agreement marks a rare victory for China’s technology giants caught in the crosshairs of the US government, as the two nations clashed over issues ranging from trade to human rights and Hong Kong’s rule. Smartphone rivals Xiaomi, Oppo and Vivo leave Huawei in the dust Trump had signed an order in November barring American investment in Chinese firms owned or controlled by the military in a bid to pressure Beijing over what the US has described as abusive business practices. The order against Xiaomi, alongside a handful of other Chinese firms, was issued in the waning days of his administration. Trump had also gone after other Chinese behemoths including ByteDance , owner of the hit video-sharing app TikTok , and Tencent Holdings , which owns super app WeChat . Telecommunications equipment maker Huawei Technologies Co was the hardest hit, after it was barred from buying American-made components and shut out of infrastructure projects around the world.