The Department of Homeland Security fired a broadside across the bow of sanctuary cities and states Thursday, announcing it had cut New York out of the department’s trusted traveler programs, leaving hundreds of thousands of state residents to face longer lines at airports and border crossings.

The move was in response to New York’s new law that grants driver’s licenses to illegal immigrants and bars immigration agencies from accessing state motor vehicle databases.

New York’s goal was to shield illegal immigrants, but federal officials said they can no longer access state records for any residents, so they can’t verify records of those applying for the travel programs. That means they can’t approve any new applications.

SEE ALSO: DHS suspends New York from travel program in response to sanctuary laws

“This irresponsible action has consequences,” said Chad Wolf, the department’s acting secretary.

About 86,000 New Yorkers who have applications pending will be denied and their $100 fee will be returned. Another 800,000 New Yorkers who are already enrolled in the programs will not be kicked out, but they won’t be able to renew when their five-year permits expire.

Homeland Security also runs customs, and New York’s new law cut off access to state vehicle registration records. Officials said that means residents trying to export used cars will have to wait longer while the department verifies owner and vehicle identification numbers manually.

State Attorney General Letitia James vowed not to back down.

“New Yorkers will not be targeted or bullied by an authoritarian thug,” she said.

The ban on New Yorkers applies to Global Entry, which speeds up entry for travelers, and to the Free and Secure Trade program, which speeds cross-border commercial truck traffic.

Rep. Bennie G. Thompson, chairman of the House Homeland Security Committee, questioned Homeland Security’s move, saying Global Entry calls for an in-person interview, fingerprinting and a federal background check, so there’s no need to query the databases.

He called the new policy an attempt to “perpetuate a partisan fight with New York elected officials” and complained the decision was announced on Fox News, which he said underscored the political motivations.

The Mississippi Democrat said Congress will need to step in and curtail “this abuse of power.”

But Todd Owen, executive assistant commissioner at Customs and Border Protection, said the New York databases are the only place where the agencies can check records on DUIs or other serious traffic offenses.

He said having a DUI or a major offense disqualifies someone from being a trusted traveler. No databases means no checks, ergo no approvals.

“We cannot let people into the program that have not been properly vetted,” he said.

New York’s new law applies specifically to CBP and U.S. Immigration and Customs Enforcement.

It does not apply to the Transportation Security Administration, which still has access to the records. And since TSA runs the popular airport Pre-Check program, that is not affected — right now.

“It doesn’t mean it can’t be in the future,” said acting Deputy Secretary Ken Cuccinelli.

He warned other states pondering laws similar to New York’s to think twice.

“Anything that threatens the safety of people anywhere in the country is of concern to the Department of Homeland Security,” he said.

Rosemary Jenks, vice president at NumbersUSA, which backs stricter immigration limits, hailed the move as an important signal.

“This is the first time in my memory that they’re taking steps that will majorly inconvenience people, but for a legitimate reason,” she said. I would imagine there would be pretty big pressure on state legislators to rescind this law.”

She said having access to databases is important for CBP and ICE officers and agents who make vehicle stops, in the same way as state and local police.

Without access to driver’s records, they can’t run plates or driver’s licenses and will struggle to verify identities of those they stop.

“There is absolutely a legitimate reason to be concerned about the safety of both Border Patrol and ICE officers,” she said.

Mr. Cuccinelli said he was stunned that New York seemed to forget the lessons of the 2001 terrorist attacks, which left more than 2,600 people dead in the state.

The hijackers who turned planes into weapons used driver’s licenses to board the planes, and the 9/11 Commission said they were able to get away with the plot because of too many restrictions on sharing information among law enforcement and national security agencies.

New York, controlled by Democrats, has been one of the most combative states toward President Trump, with immigration being a major flashpoint.

The state’s sanctuary policies limit cooperation with ICE on deportations, and ICE in recent weeks has taken pains to point out murder and other crimes committed by people New York officials released rather than turn over to deportation officers.

The most striking case came last month when New York City police charged 21-year-old illegal immigrant Reeaz Khan with raping and killing a 92-year-old woman. Mr. Khan’s brother turned him in after seeing him on video that police released showing the encounter.

Mr. Khan was arrested in November and ICE asked for him to be turned over, but police refused.

City officials said they never received the detainer request. ICE has released a copy of the fax it sent making the request.