Under the Secure Communities Act, a federal program from the Department of Homeland Security, sheriffs and police officers across the country were told to detain immigrants who were flagged for deportation by Immigration and Customs Enforcement. This program at its height led to the deportation of 200,000 people back to their countries of birth, without warrants, and tearing many families apart in the process.  Increasingly in municipalities around the country lawmakers and sheriffs are starting to fight back, fearful of the costs of fighting lawsuits alleging they violated the civil rights of the detainee.

This week, New York City Council speaker, Melissa Mark-Viverito announced she will introduce a bill to end the imprisonment of people without a judicial warrant at Rikers Island prison. Under the bill the New York Police Department and Department of Corrections would only be to hold detainees backed up by a warrant for a federal judge, and only if an immigrant had been convicted of a violent or serious crime.

"By further limiting ICE's role in the detention and deportation of immigrant New Yorkers, we set the national standard for the treatment of our immigrant population. Families will no longer be needlessly torn apart by ICE's dragnet enforcement efforts," said Mark-Viverito.

The bill would also remove the ICE office from Rikers, and prohibits the Department of Corrections from spending resources on enforcing immigration laws.

READ MORE: Sheriff won't hold immigrants without a warrant.

40 counties across New York State have stopped honoring federal government requests as a result of the New York Civil Liberties' work with the New York State Sheriffs' Association. In May they wrote to every sheriff's office advising them that imprisoning immigrants for extended periods without a warrant is illegal and opens law enforcement up to litigation. In June the Sheriffs' Association recommended people should no longer be held to custody due to an ICE request.

Just two weeks ago on Long Island, Suffock Count Sheriff Vincent F. DeMarco issued a memorandum not to hold an inmate "solely on an ICE detainer" unless ICE produced a warrant. Nassau County ended it cooperation in June.

"A foundational principal of our country is the right to due process. No New Yorker should ever be imprisoned unless there is a warrant for his arrest or a judge has reviewed his case," said Donna Liberman, executive director, New York Civil Liberties Union.