Anyone who observed the hearing on Miami-Dade County’s immigration detainer program at the Wilkie D. Ferguson Federal Courthouse in Miami last week got a glimpse of the terrible state of American immigration policies.

A year and a half ago, Miami-Dade Mayor Carlos Gimenez reversed the county’s policy on complying with requests from the Immigration and Customs Enforcement (ICE) to detain people suspected of being undocumented.

The mayor became the first public official in the country to agree to cooperate with the virulent anti-immigrant sentiments and policies of the Trump Administration and the Sessions Department of Justice. It was clear that he did so hoping that, by setting aside past policy respecting constitutional principles of due process, the county would stay in the good graces of the new administration and not jeopardize transportation funds it was seeking from the federal government.

At the time, the mayor vowed that he would not go all the way with the Trump Administration — he promised that Miami-Dade would still be a welcoming community for immigrants and that police would never stop people in the county and inquire about their citizenship or immigration status. Nevertheless, he ordered county jail officials to honor all requests from the federal government to detain anyone who was scheduled to be released but who ICE suspected of being undocumented.

A majority of the county commissioners decided to follow the mayor’s directive and formally reversed the county’s policy. Probable cause to justify keeping someone locked up went from meaning a warrant issued by a judge to whatever some immigration official claimed. In our system of constitutional democracy, people are not supposed to be locked up just on the say-so of a government official.

So last year, the county planted a seed — setting aside the role of the judiciary, and agreeing to lock people up whenever the federal government asked them to do so. To no one’s surprise, this unconstitutional seed bore fruit — and in the case now before the federal court in Miami, the fruit was a terrible mistake. Not only was a person detained without a warrant, the person was a U.S. citizen, not an undocumented immigrant.

Now, the illegally detained citizen — who is represented by the ACLU of Florida, the University of Miami’s Immigration Law Clinic, and one of the nation’s most respected immigration law expert, Miami’s Ira Kurzban — is suing the county for letting federal anti-immigrant zealotry be the county’s jail policy.

Even worse, what was on display in court last week may be an example of what is happening all over the country, as the nation of immigrants lives under the heel of hateful anti-immigrant policies. Attorneys for Mayor Gimenez and the commission argued that they were not responsible for doing what the federal government asked them to do. Instead, county attorneys claimed that it was the fault of the federal government for asking them to act unconstitutionally by setting aside the 4th Amendment rights of the people in Miami-Dade.

What a shameful episode: The mayor and a majority of the commissioners were seduced into trashing fundamental constitutional principles by the possibility of federal dollars. And it was all unnecessary, as those cities and counties across the country that have taken a principled stand for the Constitution have won virtually every lawsuit against the federal government.

This op-ed first appeared in the Miami Herald.