An attorney for the American Civil Liberties Union asked a federal appeals court Tuesday to void a Arizona constitutional provision denying bail to some people awaiting trial who are in this country illegally.

There are legitimate reasons to make bail off-limits for some people, Cecelia Wang told the 11-judge panel of the 9th U.S. Circuit Court of Appeals in San Francisco. She said that serves the purpose of assuring they appear in court for their trial.

Wang said, though, the real purpose of the 2006 voter-approved state constitutional amendment was to punish people who are not in the country legally. And that, she argued, violates their federal constitutional rights.

That contention is being disputed by attorney Tim Casey. He said the measure “serves a compelling interest,” ensuring that defendants charged with felonies remain in this country until their trial.

But several of the judges suggested the evidence shows that the measure goes far beyond what is necessary to achieve that goal.

“There’s no evidence whatsoever of the kind of a tight fit between the means and the end,” said Judge Paul Watford. And Judge Marsha Berzon pointed out that the denial of bail is automatic, with no ability of the defendant to show he or she is not a flight risk.

“There are people who were brought here as children and have been here for 50 years and don’t know a soul,” she said to Casey. “And you’re still applying it to them.”

Potentially more significant, Casey conceded he has “no empirical evidence” that those in the country illegally are more likely to be a flight risk than anyone else.

That admission may be crucial, as it could undermine the very basis sponsors said they had to approve the measure in the first place.

Under the terms of Proposition 100, bail is unavailable to those charged with “serious felony offenses” if they are in this country illegally and if “the proof is evident or the presumption great” that the person is guilty of the offense charged.

It was crafted by former state Senate President Russell Pearce — at the time a state representative — who argued that anyone who has crossed the border illegally probably has few ties to this country. That, he said, makes them at greater risk of fleeing before trial.

Voters approved the 2006 measure on a 3-1 ratio.

But Wang argued that runs contrary to constitutional requirements that essentially say the sole purpose of bail is to ensure that those charged with certain crimes show up in court. And she argued the record shows backers were mainly interested in punishing those in the country illegally.

For example, Pearce promoted the bill on the ground that “all illegal aliens in this country ought to be detained, debriefed and deported.”

There were statements from other lawmakers, too, including from Rep. John Kavanagh, R-Fountain Hills, who said he was “amazed that we provide bail to anybody who’s arrested for a crime that’s an illegal alien.” Kavanagh called the measure “a first step to what we should be really doing, and that’s deporting anybody here illegally.”

While some statements might have been “inappropriate” they do not invalidate the law, Casey told the court.

“Some people, demagogues or what, are criticizing a certain group of people that are here unlawfully because it’s politically expedient or unpopular or popular,” he said.

But Casey also said the fact that the measure ultimately was ratified by voters cures any problems with legislative intent.

Motive aside, Wang said the measure illegally deprives criminal defendants of an “individualized assessment of flight risk.”

One question for the court is whether legislators — and ultimately the voters — are entitled to deny bail without evidence there is a problem.

“They got here illegally, the border in Arizona is very close,” said Chief Judge Alex Kozinski. “Depending on where you are in Arizona, it could be right across the street.”

But Wang said that, by itself, is insufficient reason to determine that someone should be denied bail.

As proof, she said there were people who were awaiting trial at the time Proposition 100 was approved who had been out on bail, were showing up for court hearings as required — and then were taken into custody solely because of the new requirement.

Casey, however, said these are legitimate decisions for lawmakers. That led Berzon to ask if the Legislature could simply decide that, in the interest of ensuring people show up for trial, no one should be allowed bail.

“Theoretically, under your hypothetical, a Legislature could do that,” Casey responded. “I’m not arguing they should do that.”

That attitude clearly did not sit well with the judge who pointed to the Eighth Amendment of the U.S. Constitution.

“So the ‘excessive bail clause’ is just a joke?” she asked.

“I certainly don’t consider that a joke,” Casey responded, saying he reads that to mean only that if someone is entitled to bail, it cannot be excessive. He said that does not undermine his argument.

It could take months for the court to decide the issue. Whichever side loses is expected to seek Supreme Court review.