The Department of Homeland Security banned New Yorkers from taking part in trusted traveler programs, including the popular Global Entry, on Wednesday, a retaliatory move the agency’s chief said came after state lawmakers enacted protections for undocumented immigrants.

Acting DHS Secretary Chad Wolf said Wednesday on Fox News that, effective immediately, all New Yorkers would be barred from enrolling or re-enrolling in the programs, which are meant to expedite entry into the United States for low-risk travelers. The programs, including Global Entry, NEXUS, SENTRI and FAST, have millions of members nationwide and are often touted at airports as a means to bypass long customs and border protection lines.

Wolf sent a letter to state officials explaining that the agency had taken the step after New York passed its so-called Green Light Law, which allows undocumented residents to obtain a driver’s license. The measure also prohibits personal information held by the Department of Motor Vehicles to be used by DHS or its agencies, including Immigration and Customs Enforcement and Customs and Border Protection.

“Today we sent a letter to New York indicating because they took these measures, New York residents are no longer eligible to enroll in these trusted traveler programs,” Wolf told Fox News host Tucker Carlson. “They can’t enroll or re-enroll in these trusted traveler programs that CBP offers because we no longer have access to make sure that they meet those program requirements. We need to do our job.”

DHS directed HuffPost to Wolf’s remarks on Fox News but did not provide any additional comment.

The Green Light Law, which went into effect in December, has already been incredibly popular. Lines outside state DMV offices stretched for blocks on the first day that people were able to apply for driver’s licenses. Advocates had long argued that expanding the benefit to all residents would increase public safety and access to public services for the estimated 940,000 undocumented immigrants in New York.

Wolf’s decision came just a day after President Donald Trump’s State of the Union address, in which he attacked “sanctuary cities” that have passed laws meant to protect undocumented people and limited local cooperation with federal officials. The issue is popular with the president’s base, and the anti-immigrant rhetoric is often featured in his campaign rallies.

“The United States of America should be a sanctuary for law-abiding Americans, not criminal aliens,” Trump declared Tuesday, adding details about two violent crimes in an effort to bolster his case.

Wolf echoed that sentiment in his letter this week, saying the Green Light Law “prevents DHS from accessing relevant information that only New York DMV maintains, including some aspects of an individual’s criminal history.”

“Although DHS would prefer to continue our long-standing cooperative relationship with New York on a variety of these critical homeland security initiatives, this Act and the corresponding lack of security cooperation from the New York DMV requires DHS to take immediate action to ensure DHS’s efforts to protect the Homeland are not compromised,” Wolf wrote.

He said the changes, which also prohibit vehicle exports, would go into immediate effect.