The wheels of justice turn, and sometimes they turn in directions that make city halls mighty uncomfortable.

New York City Mayor Zohran Mamdani has planted his flag firmly in opposition to federal immigration enforcement, declaring that anti-Israel activist Mahmoud Khalil should “remain in New York City” even as the Trump administration works methodically to remove him from American soil. The Justice Department’s Board of Immigration Appeals issued a final order of removal Thursday, marking what may be the final chapter in a case that has become a flashpoint in the ongoing debate over campus activism and immigration enforcement.

The facts are these: Khalil, a 31-year-old lawful permanent resident and Columbia University graduate, stands at the center of a federal crackdown targeting noncitizens who participated in anti-Israel campus demonstrations connected to the war in Gaza. His case became the first publicly known arrest in this broader enforcement effort, making him something of a test case for the administration’s willingness to use immigration law as a tool against what it views as dangerous activism.

The Board of Immigration Appeals denied Khalil’s motion to dismiss, a decision his legal team immediately condemned as “baseless and politically motivated.” They argue the federal government is engaged in retaliation against protected speech, claiming the case lacks evidentiary foundation. It is worth noting that Khalil has notably avoided explicit condemnation of Hamas while criticizing what he terms “selective outrage” regarding Palestinian suffering.

This puts Mayor Mamdani in direct confrontation with federal immigration authorities, a position that raises questions about the proper relationship between local and federal law enforcement. The mayor’s public declaration that Khalil should remain in the city represents more than mere political posturing. It signals a willingness to use the bully pulpit of city hall to oppose federal deportation proceedings, even when those proceedings have been upheld through the proper legal channels.

The larger context cannot be ignored. Campus protests over the Gaza conflict have roiled American universities, with demonstrations sometimes crossing the line from protected speech into disruption and, critics argue, intimidation. The Trump administration has made clear its intention to use every legal tool at its disposal to address what it views as a threat to public order and safety, particularly when those involved are not American citizens.

Khalil’s status as a lawful permanent resident adds complexity to the case. Green card holders enjoy significant protections under American law, but those protections are not absolute. Certain criminal convictions or activities deemed contrary to national security can result in removal proceedings, even for long-term residents.

The collision between local sanctuary policies and federal immigration enforcement is nothing new, but this case brings fresh urgency to the debate. When a sitting mayor publicly opposes the deportation of an individual who has exhausted his legal appeals, it raises fundamental questions about the rule of law and the hierarchy of governmental authority.

The Trump administration shows no signs of backing down, and Mayor Mamdani appears equally committed to his position. What happens next may well set precedents that extend far beyond one activist’s fate.

Related: Acting Attorney General Authorizes Capital Punishment in Los Angeles Gang Killing