“No one should ever use our national security as a political weapon, let alone the commander in chief,” James told reporters at her lower Manhattan office shortly after filing the suit.

“The president’s crusade against New York is not only an inconvenience to New Yorkers, but also poses a direct threat to one of the nation’s largest economies,” she said. “We will not allow the president of the United States to single out New Yorkers, to discriminate against New Yorkers, to target New Yorkers and to coerce us.”

The exclusion violates a federal law, the Intelligence Reform and Terrorism Prevention Act of 2004, which required the establishment of a registered traveler program, the suit charges.

“Singling out one state for coercion and retribution as a means to compel conformity with preferred federal policies is unconstitutional,” the suit says. “Defendants’ ban on New Yorkers’ participation in the Trusted Traveler programs not only violates the law, but also injures New York by undermining public safety and causing extensive economic harm.”

Thirteen other states and Washington, D.C. issue drivers licenses regardless of immigration status, so New York argues that the state was singled out for political reasons.

Homeland Security argues that the ban on sharing DMV information stops them from gathering information needed to verify travelers’ eligibility. But the programs require passports, and New York officials argue that driving records aren’t relevant to clearing travelers.

“It has nothing to do with safety. It’s nothing more than political retribution,” James said.

The ban will hit 50,000 people who have been conditionally approved for Global Entry but are still waiting to sit for an interview and complete the process — and another 30,000 who have applied and are waiting to be vetted, according to the attorney general’s office.

Another 175,000 New Yorkers whose Global Entry memberships expire this year will not be allowed to renew.

At the border between New York and Canada, 30,000 drivers in the FAST program will lose access to an automated system, and other drivers will be blocked from the NEXUS program.

The New York Civil Liberties Union filed a separate suit Monday challenging the ban on behalf of New Yorkers eligible for the travel program.

“New York has now become the president’s favorite target,” said executive director Donna Lieberman. “But if that’s the price of being a state that lives by our Democratic values, so be it.”

