Mayor Rahm Emanuel on Tuesday questioned the legality of Attorney General Jeff Sessions’ threat to cut or “claw back” Justice Department money to “sanctuary” cities and called it “a bit of a joke” at a time when DOJ funding is being cut.

“I find it a little ironic. They said they were gonna cut or withhold monies on public safety. Did you look at the president’s budget that he introduced? He actually cut the Justice Department. So this is kind of like, in my view, a bit of a joke in that sense,” the mayor said at an unrelated news conference about street lighting.

The mayor noted that 34 other cities have “stood up” with Chicago in opposition to President Donald Trump’s threat.

“We’re very clear about our values and very clear about our priorities. And if you looked at any of the cases, you would also see that we think we have a strong argument that they can’t do what they’re claiming they’re gonna do,” Emanuel said.

The mayor advised reporters to talk to newly appointed Corporation Counsel Ed Siskel, who served as deputy White House counsel during the Obama administration. That’s apparently where the mayor is getting his view that Trump is on shaky legal ground.

Siskel branded Trump’s executive order an “unconstitutional attempt to force municipal police departments to aid in the enforcement of federal immigration law.”

“Despite professing concern for local law enforcement efforts, especially in Chicago, the order threatens to deny federal funding to local governments that refuse to be conscripted as auxiliary ICE agents,” Siskel was quoted as saying in an emailed statement.

“While Chicago is in full compliance with the requirements of federal immigration law, we oppose the order’s intent,” he wrote. “Chicago is proud to stand with 34 cities and counties across the country in asking a federal court to prevent the federal government from illegally withholding federal funds.”

For the umpteenth time, Emanuel reiterated that Chicago “has been and will continue to be” a sanctuary city where immigrants can access city services and live without fear of police harassment.

Only this time, he used the term “welcoming city” to describe Chicago’s status.

“Chicago has been and will be a welcoming city because people that come to Chicago — make the sacrifice, the struggle, the journey — are believing in a better tomorrow, and they’re part of keeping the American dream alive. Just like my grandfather 100 years ago and my father 70 years ago,” the mayor said.

“Chicago is gonna be very clear about what’s right [and] our principles. It’s also in our self-interest. I’ve been clear about that to the [Trump] administration, as have 34 other mayors of cities of all different types and sizes across the country. . . . Whether it’s people from Poland or Pakistan, Mexico or Moldova, where my grandfather came [from], or whether you’re from Ireland or India — if you believe in the American dream, we’re gonna welcome you to the city of Chicago.”

Once again, the mayor did not say how much DOJ funding Chicago stands to lose or whether the city would stop spending that money in anticipation that it might have to be repaid.

On Monday, Sessions tried to put some political muscle behind an executive order signed in January authorizing construction of a border wall with Mexico and the cutting off of federal funding to “jurisdictions that willfully refuse to comply” with immigration laws.

Sessions showed up at the start of the daily White House press briefing and threatened to cut or even “claw back” Justice Department money flowing to sanctuary cities, counties and states.

The attorney general cited criminal acts by several illegal immigrants in San Francisco and Denver as he discussed how sanctuary localities violate federal law.

“The president has rightly said this disregard for law must end,” Sessions said.

“Today, I am urging states and local jurisdictions to comply with these federal laws. . . . Moreover, the Department of Justice will require a jurisdiction seeking or applying for Department of Justice grants to certify compliance with (federal law) as a condition of receiving these awards.”

In the current federal budget year, the Justice Department’s Office of Justice Programs is on track to distribute $4.1 billion in grants nationwide.

Seventy grants totaling $120.4 million are being sent to Illinois. Examples include a joint Chicago/Cook County Edward Byrne Memorial Justice Assistance Grant of $2,333,428; the Cook County Justice and Mental Health Collaboration, $243,012; and the Cook County South Suburban Safe and Thriving Communities Project, $1 million.

Besides Chicago and Cook County declaring sanctuary status, Evanston and Oak Park have sanctuary ordinances. Melrose Park has one in the works.

Evanston Police and the Northwestern University Police Department has received a Justice Department grant of $139,277 for a Body Worn Camera Implementation Program.