New York City and California filed a joint lawsuit Tuesday against the U.S. Postal Service to stop the mail service provider from shipping thousands of cartons of cigarettes from foreign countries to U.S. residents in an attempt to curtail cigarette tax evasion.

The lawsuit filed in Brooklyn federal court alleges cigarette mail deliveries from Vietnam, Israel, China and other countries cost California around $19 million annually and New York City and New York state $21 million each year in lost tax revenues.

“Cigarette smuggling doesn’t just break the law – it endangers the health of countless Americans and enriches terrorists and organized crime,” New York Mayor Bill de Blasio said in a statement. “Yet despite all of this, our nation’s own postal service has ignored the practice and enabled one of the biggest killers in our country. It needs to end, and we intend to be the ones to end it.”

The complaint said the USPS fails to intercept the illegal packages, even when the contents are labeled “cigarettes” and fails to ban commercial cigarette shippers identified by the U.S. Justice Department. The lawsuit says as many as six million packs of cigarettes could be shipped to California each year and another five million packs to New York City and New York State.

Those numbers were determined after audits of the John F. Kennedy International Mail Facility last year. Investigators found more than 100,000 cigarette cartons destined for 48 states, the lawsuit said.

“Accepting and delivering contraband cigarettes is not only a health hazard for our citizens but a detriment to our state’s economy,” California Attorney General Xavier Becerra said.

Georgia M. Pestana, New York’s acting corporation counsel, said the Postal Service has turned a blind eye to the illegal shipments, which undermine health laws and cost states millions.

“Further, the USPS Inspector General has warned the agency that its policy of returning contraband packages to senders instead of destroying them is in conflict with the law and allows cigarette sellers simply to try again to have their cigarettes delivered,” he said. “We are asking the Court for relief, including that these illegal practices be halted.”

Messages to the Postal Service were not immediately returned.

Officials noted that aside from posing health risks, the illegal cigarette deliveries fund organized crime and terrorist groups. The lawsuit seeks a permanent injunction to prohibit the Postal Service from delivering packages known or reasonably known to contain cigarettes.