Mayor de Blasio gave up a chance to push New York City’s agenda directly with President Trump on Wednesday by pulling out of what would have been his first White House meeting with the president.

The mayor cited a Justice Department notice about a crackdown on sanctuary cities as the reason for skipping the 100-plus mayor sit-down, where infrastructure and the opioid crisis were on the agenda.

“I came down here ready to have a serious meeting and what I got was a publicity stunt from Trump,” Hizzoner told reporters in Washington D.C.

“He said, ‘Come over to my house but I’m going to take your wallet while you’re there.’ It was a slap in the face to our cities and our people.”

The DOJ had issued new warnings to New York City and 22 other sanctuary cities earlier in the day, threatening to withhold federal grants if they don’t turn over documents certifying they’re meeting federal immigration laws.

“Protecting criminal aliens from federal immigration authorities defies common sense and undermines the rule of law,” Attorney General Jeff Sessions said in a statement.

“We have seen too many examples of the threat to public safety represented by jurisdictions that actively thwart the federal government’s immigration enforcement — enough is enough.”

The letters went to New York City, Chicago, Albany, Los Angeles, San Francisico and other jurisdictions just as mayors from across the country huddled in Washington for the annual conference.

The leader of the conference, New Orleans Mayor Mitch Landrieu, equated the letters with dropping “bombs” just hours before the mayors were to meet with Trump on infrastructure spending.

He blasted the White House for threatening elected officials with arrest and putting a “bullseye” on their backs, although officials later clarified that the subpoenas were a civil, not criminal issue.

“Mr. President, we will not be divided and we will not be intimidated,” said Landrieu, before also boycotting the White House meeting. “An attack on one of our cities … is an attack on all of us. So I will not be attending.”

The Justice Department says the cities have failed to properly respond to their documents requests on sanctuary cities. Failure to comply could mean the Justice Department would claw back grants from 2016.

Despite the de Blasio boycott, the White House meeting was still attended by roughly 100 mayors, according to pool reports.

Trump later blasted the city leaders who didn’t show up, accusing them of putting “the needs of criminal illegal immigrants over law-abiding Americans.”

White House Press Secretary Sarah Huckabee Sanders said the DOJ’s position on sanctuary cities shouldn’t have come as a surprise to anyone.

“The White House has been very clear that we don’t support sanctuary cities. We support enforcing the law and following the law. And that is the Department of Justice’s job, is do exactly that,” she said. “If mayors have a problem with that, they should talk to Congress, the people that pass the laws.”