On Wednesday, the administration announced that, for the time being, it would no longer allow residents of New York State to enroll (or re-enroll) in various Trusted Traveler Programs overseen by Customs and Border Protection, which allow preapproved individuals expedited passage through airport security and immigration.

In a letter to top officials at New York’s Department of Motor Vehicles, the acting secretary of homeland security, Chad Wolf, said the move was in response to a 2019 state law enabling undocumented immigrants to obtain driver’s licenses. Proponents of the so-called Green Light Law, which was hotly debated, argued for it on both humanitarian and public safety grounds, noting that similar laws adopted by other states had resulted in a reduction in hit-and-run accidents and an increase in the number of insured drivers. As a protective measure, the law also contains a provision that blocks federal immigration agents from retrieving information from the D.M.V.’s databases without a court order.

It does not bar federal officials from demanding identification, photos, passport data and interviews from applicants for Global Entry and other security programs for travelers.

This impediment to Mr. Trump’s deportation vision was too much for the administration to bear.

Barring access to these critical records, Mr. Wolf warned, undermines “ICE’s objective of protecting the people of New York from menacing threats to national security and public safety.” He said that New York’s lack of cooperation hinders federal agents’ ability to confirm whether an individual applying for Trusted Traveler Programs membership is eligible for its benefits. As a result, he concluded, his department had no choice but to “take immediate action.”

“Seek immediate political retribution” would have been the more honest phraseology.

Mr. Wolf’s security claims were met with skepticism, and some mockery, by the president’s critics.