SAN FRANCISCO (AP) — Federal authorities would limit the use of shackles on immigrants who appear before immigration judges under a proposed settlement of a class-action lawsuit.

U.S. Immigration and Customs Enforcement agreed to avoid shackling immigrants at the San Francisco immigration court in many hearings. Immigrants will still be shackled at a type of brief, procedural hearing in which several detainees are addressed at the same time.

A federal judge in San Francisco was scheduled to consider Thursday whether to approve the settlement in the lawsuit filed in 2011 by the American Civil Liberties Union of Northern California and others.

ACLU attorney Julia Harumi Mass said the agreement applies only to the San Francisco court, which serves more than 2,000 immigrants a year who are in ICE custody at three county jails in Northern California.

The lawsuit says detainees at the San Francisco court wear metal restraints on their wrists, ankles and waists and that most are bused from jails several hours away, spending hours in shackles before, during and after their hearings.

Under the proposed settlement, detainees will not be restrained at bond or merits hearings unless they pose a safety threat or risk of escape. Except in limited circumstances, they will remain shackled at master calendar hearings, which are held for larger numbers of immigrants for brief, procedural issues like scheduling.

Immigration courts are staffed by judges working for the U.S. Justice Department’s Executive Office for Immigration Review, not the judiciary. The judges decide whether immigrants can remain in the country.

ICE houses more than 30,000 immigrants in detention facilities nationwide, many of which have immigration courts inside. In Northern California, detained immigrants are bused from leased jails in Contra Costa, Sacramento, Yuba counties to a federal building in downtown San Francisco.

“Putting them in shackles is so contrary to fundamental American values of justice and fairness,” said Mass of the ACLU, which sued federal agencies, along with the Lawyers’ Committee for Civil Rights and the law firm Wilson, Sonsini Goodrich & Rosati.

ICE declined to comment on the proposed settlement, saying it does not discuss pending litigation.

ICE released a statement that said it was “committed to preserving the dignity and welfare of all those in our custody. The agency is also obligated to ensure the safety of the public and employees visiting or working in federal buildings that house court proceedings.”

Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.