NEW YORK -- Two chimpanzees that were caged at a trailer lot and at a primate sanctuary don't have the legal rights of people in New York, an appeals court said Thursday.

Nonhuman Rights Project attorney Steven Wise had argued to the appeals court in March that adult male chimps Tommy and Kiko should be granted a writ of habeas corpus, which for people relates to whether someone is being unlawfully detained or imprisoned and should be taken to see a judge.

Wise argued that the chimps, which were caged in a trailer lot in Gloversville, outside Albany, and at a primate sanctuary in Niagara Falls, should be moved to a large outdoor sanctuary in Florida.

Chimpanzees, which can walk upright and use sticks and stones as tools to help gather food, are considered to be the closest living relatives of humans. Some have been taught to speak simple human sign language.

But the state Supreme Court's appellate division, in a ruling that affirmed a lower court's decision, said there was no legal precedent for chimpanzees being considered people and their cognitive capabilities didn't mean they could be held legally accountable for their actions.

"Petitioner does not suggest that any chimpanzee charged with a crime in New York could be deemed fit to proceed," the court said.

The court also said that even if chimps were able to get writs of habeas corpus the writs wouldn't be applicable with these animals "since petitioner does not challenge the legality of the chimpanzees' detention, but merely seeks their transfer to a different facility."

The ruling said that while Wise's "avowed mission is certainly laudable," determining the legal rights of animals was better suited to legislators.

The animal advocacy group said it would take its case to the state's highest court, the Court of Appeals.

"For 2000 years, all nonhuman animals have been legal things who lack the capacity for any legal rights," Wise said. "This is not going to change without a struggle."

The Nonhuman Rights Project, based in Coral Springs, Florida, started its litigation over the rights of chimps in 2013, when lawsuits were filed on behalf of Kiko in state Supreme Court in Niagara Falls and of Tommy in Fulton County. Those cases were unsuccessful.