San Francisco on Tuesday joined a growing nationwide call to abolish cash bail for poor defendants when it announced the city was dropping its opposition to a federal lawsuit.

City Attorney Dennis Herrera said a cash bail requirement is unconstitutional because it "creates a two-tiered system: one for those with money and another for those without."

The lawsuit was filed by two defendants who argued that requiring suspects to post cash bail to remain free pending trial unconstitutionally treats poor and wealthy defendants differently.

The centuries-old cash-bail system has become one of the flashpoints in the debate over equal justice with the U.S. Department of Justice siding with reformers.

The lawsuit challenging California's bail system in San Francisco is one of 11 filed in eight states by the nonprofit Equal Justice Under Law since January 2015. The Washington D.C.-based legal aid group seeks to abolish cash bail requirements across the country, arguing that many poor defendants languish in jail for minor offenses while wealthy suspects accused of serious crimes can often post bail while awaiting trial.

So far, cities in Alabama, Kansas, Missouri, Mississippi and Louisiana have scuttled cash bail because of the lawsuits, the center said. Lawmakers have also started to call for bail reforms.

On Oct. 11, Maryland's attorney general told lawmakers that the state's bail requirements are likely unconstitutional, prompting the district court's chief judge to issue "cautionary advice" to his colleagues to impose the "least onerous" bail conditions on defendants as possible.

This summer, the DOJ filed a brief with the Atlanta-based 11th U.S. Circuit Court of Appeals arguing that cash bail requirements "unlawfully discriminate" against poor defendants by using preset bail amounts that don't take into account the accused person's ability to pay. The 11th Circuit is considering the constitutionality of the bail system in Calhoun, Georgia.

The action taken Tuesday in San Francisco won't end the lawsuit or change the bail system because the San Francisco city attorney said the city is required to adopt the state's bail system and it's up to lawmakers or the courts to order reforms.

He said the lawsuit could still be defended by state Attorney General Kamala Harris or a trade organization representing bail bond companies.

The California Bail Agents Association is scheduled to file court papers later Tuesday urging the court to allow it to take over defending the case.

Kristin Ford, a spokesman for the California attorney general, said the case is under review.