NEW ORLEANS ― A heavyweight conservative lawyer with ties to the Trump administration squared off with the founder of a small civil rights nonprofit that aims to end “wealth-based pretrial detention” on Tuesday, in a case that could ultimately determine the future of cash bail in the United States.

Three judges from the Fifth Circuit Court of Appeals in New Orleans heard oral arguments in a lawsuit about cash bail policies in Harris County, Texas, which led individuals charged with low-level misdemeanors to spend days and even weeks in jail. The named plaintiff in the case is Maranda O’Donnell, a young mother who in May 2016 was jailed for several days on $2,500 bail after being arrested for driving on an invalid license on her way to pick up her daughter. Civil Rights Corps, a nonprofit founded to “challenge mass human caging and to create a legal system that promotes equality and human freedom,” teamed up with the Texas Fair Defense Project and the law firm Susman Godfrey in Houston to challenge bail practices in the third largest jurisdiction in the U.S.

The money bail system in place across much of the country is in many ways a modern anomaly. Who stays in jail and who gets out before trial is often not determined by public safety considerations or by a person’s history and circumstances, but by whether individuals or their family members can come up with a pre-determined amount of money to secure their release. Arrestees who cannot afford their bail end up either paying a private bail bondsman a non-refundable fee to secure their freedom, pleading guilty just so they can get out of jail, or spending weeks and months behind bars awaiting trial.

Bill Oxford via Getty Images

Harris County, which serves the Houston region, has one of the largest jails in the country. HuffPost’s jail deaths project found that the understaffed and overcrowded facility had a higher per capita death rate than most other jails in the country. The Harris County case offered an extensive body of evidence about how a money-based detention system works.

Hearings would typically last a minute or two tops. Judges or the hearing officers running the system would follow a bail schedule to set the bond amount and never inquire about a defendant’s ability to pay. And there was video showing how the system worked in practice: One judge doubled a woman’s bail from $1,000 to $2,000 because she said “yeah” instead of “yes” when asked to answer a “yes or no” question.

Following several days of hearings earlier this year, Chief U.S. District Judge Lee Rosenthal of the Southern District of Texas issued a preliminary injunction that banned Harris County from holding misdemeanor defendants for more than 24 hours if they said they couldn’t afford their bail. In a detailed 192-page opinion, the George H.W. Bush appointee wrote that under federal and state law, “secured money bail may serve to detain indigent misdemeanor arrestees only in the narrowest of cases.” She found that the plaintiffs challenging the system were likely to succeed on the merits, and that Harris County’s policies and practices violated the equal protection and due process clauses of the U.S. Constitution.

More than 4,000 misdemeanor defendants have been released from Harris County Jail under the terms of the injunction since it went into effect, according to Civil Rights Corps. The organization has been challenging local pretrial detention systems in many parts of the country. Many jurisdictions have chosen to settle and change their practices.

But Harris County is fighting on, having already racked up millions of dollars in legal fees to defend its system.

Challenging the status quo of the bail system will be an uphill battle for civil rights advocates, as money bail has a long history in the U.S. The bail bond industry is fighting to protect its interests, portraying any changes to money-based bail as dangerous to public safety and hiring Paul Clement, the former solicitor general who defended bans on same-sex marriage before the Supreme Court.

Harris County hired Charles Cooper, a well-known conservative lawyer with ties to the Trump administration, who also unsuccessfully defended a ban on same-sex marriage. And all three judges on the panel on Tuesday ― Edward Prado, Edith Brown Clement and Catharina Haynes ― were named to the Fifth Circuit Court of Appeals by former President George W. Bush.

Justin Sullivan via Getty Images Charles Cooper, lead attorney for proponents of Proposition 8, speaks to reporters at a news conference following a hearing at the Ninth Circuit Court of Appeals in 2010 in San Francisco, California.

At issue on Tuesday morning was the narrower question of whether the federal appeals court should leave Rosenthal’s preliminary injunction in place. Cooper, who was once in the running to be President Donald Trump’s solicitor general, argued that federal courts should abstain from exercising jurisdiction in the case. Cooper, also a friend of Jeff Sessions who is representing the attorney general in connection with the special counsel probe of alleged ties between Russia and the Trump campaign, said that defendants were given the “opportunity” to file what’s known as a habeas petition challenging their detention, even though such a case-by-case process would long outlast the typical jail stay.

Cooper said that Harris County had been considering bail reform before the lawsuit was filed. He said it was “erroneous” for the lower court to find that there was no individualized assessment of defendants during the one- or two-minute-long bail-setting hearings, during which defendants were typically banned from speaking.

“There is individualized consideration given to individual defendants,” Cooper claimed. He also said that Harris County has made changes to the system recently and given defendants more of an opportunity to challenge their bail.

The judges were difficult to read, posing critical questions to Cooper, Civil Rights Corps founder Alec Karakatsanis and two other attorneys who spoke before the court. Haynes, a former state district court judge in Texas, used the term “rubber stamp” to refer to the process by which bails were set, but she seemed concerned that under the injunction judges weren’t able to set bail for misdemeanor defendants in particular cases. She said the court should “want judges to act like judges” and use their discretion to make individual decisions.

Ryan J Reilly / HuffPost Alec Karakatsanis the founder and executive director of Civil Rights Corps outside the Fifth US Circuit Court of Appeals on Tuesday

Haynes asked Karakatsanis what, precisely, in the U.S. Constitution required misdemeanor defendants to be released within 24 hours. She also asked whether anything would prevent defendants from falsely claiming they couldn’t afford their bail, and whether they could make the claim that they’re indigent even if they were spending money on “all sorts of ridiculous things.” But she bucked Cooper when he used the term “hearing” to describe a bail setting procedure during which defendants are reportedly banned from speaking.

“What is a hearing if you’re not going to listen?” she asked.

Not all of the judges in Harris County are on board with the county’s defense of the status quo. Harris County Judge Darrell Jordan, who opposes the cash bail system, was in the audience on Tuesday. Jordan submitted an amicus curiae brief to the federal appeals court, telling the judges that the injunction was “necessary to fix Harris County’s broken, unconstitutional bonding practices now.” Jordan told the court that as a defense attorney he’d seen “clients, incarcerated for weeks before trial because they couldn’t afford to bond out, lose their jobs, autos, and homes,” and heard defendants “protest their innocence, but plead guilty to get out on time served, rather than stay in jail.”

Ryan J Reilly / HuffPost Judge Darrell Jordan of Harris County wants to bring an end to money-based bail.

In an interview after the hearing, Jordan said that Cooper gave the court the false impression that Harris County was actually holding bail hearings before a judge. Jordan pulled up an email on his phone that a Harris County Courts staff attorney had sent to judges Monday asking them to “ensure” they were completing in every case an order form that states that the defendant had waived a bail hearing. “Why are they sending this out to all of the judges to ensure that they’re doing this if everybody is having these hearings?” Jordan asked. “Nobody does it! Nobody fills out the forms! It’s not being done, nobody is having these hearings.”

Jordan said that Harris County officials had the “key to the bank” to fund their defense of the current system. “They have access to Harris County’s bank, and so they’re going to fight this forever,” Jordan said. He compared Cooper’s hourly rate, reportedly north of $550 per hour, to the court-appointed lawyers in his court who he said get paid $1,000 a week to represent five clients a day.

“What motivation do they have?” Jordan asked of Harris County judges. “They don’t want outsiders coming in telling them what they’re doing is wrong.” It’s a combination of wanting to maintain the status quo and maintain their egos, he said.

Rodney Ellis, a Harris County commissioner and former state senator who also supports bail reform, said the influence of the bail bond industry can’t be ignored. “It’s money,” he said. “Never underestimate the power of bail bondsmen.” Elis also said that judges and high-ranking officials found it difficult to imagine themselves in the shoes of a poor person facing a misdemeanor.

“There’s a certain sense of insensitivity, because we’re talking about people that we don’t necessarily see at our birthday parties, at our churches, at the golf games,” Ellis said.

Jordan holds individual hearings with each defendant. He spoke of one recent case in which he set a lower bail after calling up a defendant’s father and seeing what he would be able to afford. “It is more work. It takes a lot more time. But that’s my responsibility,” Jordan said. He said judges get paid enough money to work 50 to 60 hours a week, but were protective of their short work schedules and hesitant to put in the work. “They could do it if they wanted to,” he said.

Karakatsanis said that anyone who looks at the case should conclude that it’s not consistent with the Constitution or good public policy to keep people in jail because they can’t pay.

“There’s a fundamental flaw at the heart of their system in that people are being thrown in jail because they’re poor, and not for any good reason,” Karakatsanis said. “There’s a reason that the other side wants to focus on side issues and procedural issues. It’s because it’s very, very hard to defend on the merits the way the system works.”