NEW YORK — New York City accused the United States Postal Service Tuesday of flooding the state with millions of packs of illegal cigarettes shipped here from foreign countries.

The Postal Service does little to stop illicit shipments of smokes from China, Israel, Vietnam and elsewhere, costing the city millions of tax dollars, undermining public health and possibly fueling international organized crime, said city officials who filed a federal lawsuit against the mail agency along with the state of California.

“Cigarette smuggling doesn’t just break the law — it endangers the health of countless Americans and enriches terrorists and organized crime,” Mayor Bill de Blasio, a Democrat, 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.”

The complaint in Brooklyn federal court asks a judge to ban postal workers from delivering cigarette-filled packages and declare the Postal Service in violation of a decade-old anti-trafficking law.

Postal Service spokesperson David P. Coleman said the agency “does not comment on ongoing litigation.”