(Bloomberg) -- A federal judge in Washington blocked the Defense Department from restricting U.S. investment in the Chinese smartphone manufacturer Xiaomi Corp.

In the final days of the Trump administration, the Defense Department placed Xiaomi on a list of companies with alleged links to the Chinese military, triggering financial restrictions that were scheduled to go into effect next week. But on Friday, U.S. District Judge Rudolph Contreras put a temporary halt to the ban, siding with Xiaomi in a lawsuit that argued that the move was “arbitrary and capricious” and deprived the company of its due process rights.

Contreras said 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.” After the ban was announced, the smartphone manufacturer faced the prospect of being de-listed from U.S. exchanges and deleted from global benchmark indexes.

Xiaomi is the third-largest smartphone manufacturer in the world by volume. In the third quarter, it surpassed Apple Inc. in smartphone sales, according to the International Data Corporation. A lawyer for the company didn’t immediately respond to a request for comment.

In November, former President Donald Trump signed an order barring American investment in Chinese firms owned or controlled by the military in a bid to pressure Beijing over what the U.S. has described as abusive business practices. The U.S. has also pursued bans on popular Chinese-owned apps like WeChat and TikTok, invoking threats to national security.

But Contreras brushed those concerns aside in his ruling Friday. “The court is somewhat skeptical that weighty national security interests are actually implicated here,” he wrote.

The Defense Department didn’t immediately return a request for comment on Friday evening.

The case is Xiaomi v. Defense Department, 21-cv-280, U.S. District Court, District of Columbia (Washington).

©2021 Bloomberg L.P.