Global telecoms equipment maker Huawei has filed a lawsuit against the US government, challenging the constitutionality of an American law that restricts the Chinese company from doing business in the country.

Huawei filed the dispute in a US District Court of Texas, the company said on Thursday. Huawei has denounced the provisions of Section 889 of the National Defence Authorisation Act that prohibits any state-owned agent, agency or government contractor, who gets loan or grants from the US government, from using Huawei equipment.

The law was passed last year. In the lawsuit, Huawei pleads that it is unconstitutional to single out a person or a group for penalty without a fair trial.

Huawei launched its 5G-enabled smartphone last month at the Mobile World Congress in Barcelona. It also exports 5G hardware and infrastructure to many countries. The company has secured more than 25 5G commercial contracts.

Fifth-generation network is expected to support significantly faster mobile broadband speeds and heavier data use than previous generations, while realising the full potential of the Internet of Things.

Following US allegations, the UK’s BT Group has barred the use of Huawei 5G-equipment from its core network. Australia and New Zealand have also announced they would not involve Huawei in building 5G systems in their countries.

Huawei has invested significantly to become a 5G leader and any restriction will only harm the national interests of other countries. Filing the suit was a last resort for Huawei and it now looks forward to the court’s verdict.

On March 1, the chief financial officer of Huawei, Meng Wanzhou, also filed a prosecution against the Canadian authorities alleging she was wrongfully detained and her constitutional rights have been violated.

The suit was filed in the Supreme Court of British Columbia against the Canadian Border Services Agency, a Royal Canadian Mounted Police officer and the Canadian government.

Ms Meng, who was arrested on December 1, appeared in a British Columbia court on Wednesday. Her lawyer, Richard Peck, told the court that allegations against his client have a political character and also raised US President Donald Trump’s comments on the case, according to Reuters.

Mr Trump said in December that he would possibly intervene in the trial if it could help secure a trade deal with China. The next court hearing in Ms Meng’s case is scheduled for May 8.