BOULDER, Colo. (AP) — The case before the Colorado Supreme Court on Thursday was about elephants but the justices had a few questions about dogs. If five elderly elephants at a zoo in Colorado Springs win the right to challenge their captivity in court, what could happen to the pets kept by many people the packed courtroom? If elephants can seek their freedom, Justice Melissa Hart wondered, what might happen with her dog?

“How do I know when it stops?” Hart asked during the hearing on whether five elephants from the Cheyenne Mountain Zoo should be treated as “persons” under the law. It was a question asked several times but never really answered.

An animal rights group, the NonHuman Rights Project, says Missy, Kimba, Lucky, LouLou, and Jambo, born in the wild in Africa, should be able to use a long-held process that’s mainly for prisoners to dispute their detention. The group says the elephants are showing signs of brain damage because the zoo is essentially a prison for such highly intelligent and social animals, known to roam for miles a day. They want the animals released to one of the two accredited elephant sanctuaries in the United States, believing they could not live in the wild at this point.

The group unsuccessfully sued in 2022 on behalf of an elephant at the Bronx Zoo named Happy. New York’s Court of Appeals ruled that Happy, while intelligent and deserving of compassion, cannot be considered a person illegally confined with the ability to pursue a petition seeking release.

The New York ruling said giving such rights to an elephant “would have an enormous destabilizing impact on modern society.”

The Cheyenne Mountain Zoo says moving the elephants and potentially placing them with new animals would be cruel at their age, possibly causing unnecessary stress. It says they aren’t used to being in larger herds and, based on its experience, they don’t have the skills or desire to join them.

The justices will issue a ruling in the coming weeks or months.

During the hearing, the group’s lawyer, Jake Davis, urged the justices to focus on the five “individuals” he represents. He asked them to rule that the elephants can pursue a habeas corpus petition and send the case back to a lower court to consider that petition. However, he did say domesticated animals like dogs, which are familiar with lounging on the couch, are in much different category than wild animals.

Justice Maria Berkenkotter said Davis had described “beautifully and painfully” the elephants’ rocking behavior, which the group says shows distress. But she wondered whether his group should instead try to purse changing the law at the state legislature or pass a ballot measure to protect the elephants.

Chief Justice Monica Marquez pressed the zoo’s attorney on a main point made by the animal rights group— that the right to habeas corpus has been extended over the years, such as to enslaved people and women in abusive marriages.

All those extensions were made to human beings, responded John Suthers, a former U.S. attorney and Colorado attorney general who represented the zoo. He pointed to Happy’s case in New York, where the judges ruled that the right to challenge detention belongs to human beings because they are humans who can be held accountable by the legal system.