NEW YORK — Huawei is on trial in federal court in Brooklyn on charges that it built its global business by stealing American technology and evading U.S. sanctions against Iran and North Korea, according to prosecutors.

The U.S. government has banned Huawei products from the country, citing national security concerns. Prosecutors describe the company as a criminal enterprise.

The case is rooted in a 2018 arrest that triggered a diplomatic crisis. Canadian authorities arrested Huawei Chief Financial Officer Meng Wanzhou in December 2018. China responded by detaining two Canadian businessmen, treating them as bargaining chips to secure her release.

One of those detained Canadians, Michael Kovrig, worked as an analyst for the International Crisis Group. Chinese police arrested him on suspicion of espionage the same month. He was held for nearly three years in conditions he described as arbitrary, spending about 145 days in a padded cell in solitary confinement at a secret detention facility.

Kovrig said the Chinese Communist Party directed Beijing's State Security Bureau to detain Canadians as pressure on the Canadian government to release Meng Wanzhou. He said his work on foreign policy and national security was transparent and well-known within Chinese circles, making it easier for authorities to fabricate charges against him.

The detentions ended after the U.S. agreed to a plea deal releasing Meng Wanzhou. China then freed both Canadian businessmen after they had been held for more than 1,000 days combined.

The current trial addresses the underlying allegations against Huawei on technology theft and sanctions violations, separate from the resolution of Meng's case.