The Trump administration has immediately barred New York residents from enrolling in “trusted traveller programmes” (TTP), in retaliation for a new state law which blocks federal immigration officials from accessing motor vehicle records.

The US Department of Homeland Security (DHS) confirmed the move on Thursday, the morning after acting homeland security secretary Chad Wolf first announced the measure on Fox News.

The drastic change came just hours after Mr Trump attacked New York’s sanctuary city status during his State of the Union address.

Sanctuary cities are localities that provide added protection to immigrants and refuse to cooperate with federal officials and federal law enforcement, which has only escalated since Mr Trump took office.

In a three-page letter, DHS said the New York legislation, dubbed the "Green Light" law, prevents federal agencies from protecting residents from "menacing threats to national security and public safety".

All the president's lawyers: The team fighting Trump's impeachment Show all 6 1 /6 All the president's lawyers: The team fighting Trump's impeachment All the president's lawyers: The team fighting Trump's impeachment Alan Dershowitz Dershowitz is a controversial American lawyer best known for the high-profile clients he has successfully defended. Those clients have included OJ Simpson, Jeffrey Epstein and Harvey Weinstein. One longtime Harvard Law associated told the New Yorker Dershowitz "revels in taking positions that ultimately are not just controversial but pretty close to indefensible." Getty All the president's lawyers: The team fighting Trump's impeachment Ken Starr Starr became a household name in the 1990s as the independent counsel who led the investigation that led to Bill Clinton's impeachment. That investigation began as a look into a real estate scandal known as Whitewater, and eventually led to impeachment after Mr Clinton lied under oath about having an affair with White House intern Monica Lewinsky. AP All the president's lawyers: The team fighting Trump's impeachment Jay Sekulow Sekulow is the president's longtime personal attorney, and, now, personal lawyer in the White House. He has been accused by former Rudy Giuliani associate Lev Parnas of being "in the loop" during the Ukraine scandal. Getty All the president's lawyers: The team fighting Trump's impeachment Pam Bondi Bondi is the former attorney general in Florida, and a longtime backer of the president's. She made a name for herself in Florida for taking hyper partisan stances on issues, and her penchant for publicity. She is likely to be a prominent public-facing figure during the trial. AFP/Getty All the president's lawyers: The team fighting Trump's impeachment Pat Cipollone Cipollone is the White House counsel, and leading the president's defence team. Getty All the president's lawyers: The team fighting Trump's impeachment Rudy Giuliani While not officially named as one of the president's impeachment lawyers, it is hard to ignore Giuliani's outsized role in this process. The former mayor of New York has been making headlines for months as he defends his client, and for his apparent role in the effort to compel Ukraine to launch the investigation into Joe Biden. We'll see how he figures in the actual trial, which he has said he would like to be a part of. Reuters

The law, which went into effect in December, allows people without legal permission to be in the US to apply for driver's licences. It also included a provision prohibiting state DMV officials from providing any of its data to entities that enforce immigration law unless a judge orders them to do so.

The law blocks US Customs and Border Protection (CBP), which patrols the US-Canada border in New York and US Immigration and Customs Enforcement (ICE) from obtaining the vehicle's owner information.

Mr Wolf called New York's new law "disappointing" during a Fox News interview with Tucker Carlson late on Wednesday night. He said the suspension of Global Entry and similar TTP initiatives was effective immediately.

The programmes allow quick clearance at select airports for pre-approved travellers who are considered “low risk” by CBP upon arrival in the US. Members enter the country through automatic kiosks in order to reduce waiting time.

"They (New York residents) can't enrol or re-enrol in these trusted traveller programmes that customs and border protections offers because we no longer have access to make sure that they meet those programme requirements," he said.

A senior adviser to New York governor Andrew Cuomo, Rich Azzopardi, said the move by DHS was politically motivated.

"This is obviously political retaliation by the federal government and we're going to review our legal options," Mr Azzopardi said.

President Donald Trump holds up newspaper that reads "ACQUITTED" at 68th annual National Prayer Breakfast

Mr Cuomo, a Democrat, approved the Green Light law last summer, allowing individuals to use foreign-issued documents to prove their age and identity so they can apply for driving privileges.

Lawmakers and Mr Cuomo became worried that ICE and CBP would be able to easily obtain information about people seeking a licence, and possibly making it easier for them to be deported.

Since becoming president, Mr Trump has routinely attacked New York; a liberal state which opted by more than 20 points for Hillary Clinton in the 2016 presidential election.

Last month Mr Trump attacked the city over plans to build sea barriers to protect the region from rising sea levels.

"A massive 200 Billion Dollar Sea Wall, built around New York to protect it from rare storms, is a costly, foolish & environmentally unfriendly idea that, when needed, probably won’t work anyway," Mr Trump tweeted. "It will also look terrible. Sorry, you’ll just have to get your mops & buckets ready!"