President Trump and New York Gov. Andrew M. Cuomo (D) traded barbs Thursday ahead of an afternoon meeting during which Cuomo hoped to negotiate possible relief for New York residents from a U.S. government decision to terminate their access to the nation’s Trusted Traveler programs.

Department of Homeland Security officials said last week that the government was canceling New York residents’ access to the Trusted Traveler programs, which allow pre-vetted individuals expedited entry into the United States upon returning from international travel. The move came in response to a new state law that allows unauthorized immigrants to obtain New York state driver’s licenses and restricts immigration authorities’ access to license data. Authorities said DHS needs the data to properly vet Trusted Traveler applicants and that the New York law put U.S. citizens’ safety at risk.

Cuomo said this week that he had offered DHS a compromise: access to New York Department of Motor Vehicles data that concerns program applicants only. But neither Cuomo nor Trump appeared optimistic about the prospect of an agreement emerging from Thursday’s meeting.

“I have no problem with them looking at the database for Trusted Traveler Program people. But that’s not what it’s about,” Cuomo said Thursday morning on MSNBC’s Morning Joe. “It’s about retaliation.”

On CNN, Cuomo told Alisyn Camerota that he wants “to make sure the president knows that his Department of Homeland Security is extorting other governments. . . . They said they’re going to punish governments that don’t get in line with their dictate.”

Trump fired back on Twitter, noting that he “must understand that National Security far exceeds politics.” He added that “New York must stop all of its unnecessary lawsuits & harassment, start cleaning itself up, and lowering taxes. Build relationships, but don’t bring Fredo!” — a reference to a character from “The Godfather” who symbolizes weakness and intellectual inferiority; Trump has used the term to insult Cuomo’s brother, CNN host Chris Cuomo.

The DHS move against New York was among a series of election-year efforts in the past week aimed at taking on “sanctuary” juristicions — Democratically controlled states, cities or counties that limit their cooperation with federal immigration authorities. After Trump attacked sanctuary jurisdictions in his State of the Union address, the administration also announced lawsuits against the states of California and New Jersey, and King County, Wash., challenging their sanctuary policies.

Trump and DHS officials have repeatedly clashed with New York leaders in particular, people who Trump believes have been overly critical of his policies and actions. “Very hard to work with New York — So stupid,” Trump tweeted last weekend. “All they want to do is investigate to make me hate them even more than I should,” he tweeted of New York City and state in December.

New York prosecutors are investigating whether Trump and his business, the Manhattan-based Trump Organization, lied to insurance companies and broke state law.

Trump and his supporters say sanctuary policies, which most frequently refer to local law enforcement officials’ refusal to detain people at the request of immigration agents, endanger public safety. In his State of the Union address, Trump decried sanctuaries for releasing “dangerous criminals” that he said otherwise would have been deported and referred specifically to a “brutal rape and murder” of an elderly woman in New York.

The alleged threat posed by sanctuary policies to public safety was a prominent talking point during Trump’s 2016 presidential campaign, though he has been unsuccessful in efforts to withhold federal funding from such jurisdictions.

Cuomo, who has filed a lawsuit against the federal government for its action against New York, has challenged the DHS claim that the government needs access to DMV data to vet Trusted Traveler applicants because a driver’s license is not required to apply for the programs. Cuomo said the move amounted to political “extortion” of a liberal state for a policy Trump doesn’t like.

Cuomo reiterated that claim Thursday ahead of his meeting with Trump, accusing the president of using the state’s law to “make political hay.”

“They say, ‘We’re kicking you out of the Trusted Traveler program because we don’t have the information,’ ” Cuomo said on CNN, noting that he told the acting DHS secretary that he would “give you whatever information you want on the enrollees for the Trusted Traveler Program.” But that, Cuomo suggested, wouldn’t be a sufficient compromise for the administration, because its move to block New York’s access to Trusted Traveler privileges was not “rational” and was rooted in a desire for political retaliation.