(AP) -- The Department of Homeland Security says New York residents will be cut off from ‘trusted traveler’ programs because of a state law that prevents immigration officials from accessing motor vehicle records.

Acting Deputy DHS Secretary Ken Cuccinelli says tens of thousands of New Yorkers will be inconvenienced by the action.

DHS officials say the New York law endangers national security by preventing federal agents from getting access to motor vehicle and criminal records in the state.

New York officials said the decision was politically motivated.

The move came a day after President Donald Trump slammed New York for being a sanctuary city in his State of the Union address.