FedEx is suing the United States Department of Commerce, claiming that it has been “essentially deputize[d]” to enforce its trade blacklist. The lawsuit comes a month after Huawei said it is reassessing its relationship with the delivery giant after several packages meant for shipment within Asia were instead diverted, or erroneously marked for delivery, to the U.S. FedEx claimed the packages (which Huawei said did not contain any technology covered by the trade ban imposed against it by the Trump administration) had been misrouted by accident.

In a statement today about the lawsuit, FedEx said that the current export ban “places an unreasonable burden on FedEx to police the millions of shipments that transit our network every day.” Filed on Monday, the lawsuit asks the U.S. District Court in the District of Columbia to stop the Department of Commerce from enforcing prohibitions in the Export Administration Regulations (EAR) against FedEx.

FedEx said in its court filing that it has “developed a sophisticated proprietary risk-based compliance system” to adhere to U.S. export laws by screening for senders or recipients on the list of entities believed to pose a national security risk. Huawei, which was not mentioned by name in either FedEx’s announcement or its complaint against the U.S. government, was added to that list last month. But FedEx says the U.S. government expects it to perform a “virtually impossible task, logistically, economically, and in many cases, legally” since it handles million of packages each day and most of them are sealed by customers before being given to the company. Therefore, the company argues that EAR violates its rights to due process under the Fifth Amendment.

China is an important growth market for FedEx, but earlier this month its future there was put in jeopardy when the Chinese government said it was under investigation for violating laws and regulations after the incident involving Huawei’s packages. Last year the company was forced to cut its 2019 earnings guidance. FedEx’s chairman and CEO Frederick Smith blamed “bad political choices” around the world, including Brexit, state-owned enterprises and China and U.S. tariffs, for hurting its business.