In what may be a first, an appeals court in Argentina has recognized a nonhuman as having basic legal rights. A Buenos Aires judge ruled in favor of advocates who are calling for more freedom for a 28-year-old orangutan who was born in a zoo.

The advocacy group filed a petition for a writ of habeas corpus on the orangutan's behalf, which would require proof of a justified detention.

Wired reports: "On Friday, an appeals court declared that Sandra, who is owned by the Buenos Aires Zoo, is a 'non-human person' who has been wrongfully deprived of her freedom."

In the ruling that was officially published Monday, the court says that by following a dynamic interpretation, "it is necessary to recognize that the animal is subject to rights, and should be protected," the AP says.

Sandra was born in a zoo in Germany and sent to Argentina 20 years ago. An animal rights group argued that she had been wrongfully forced into a life of incarceration. The group now wants Sandra to be transferred to a sanctuary.

Pablo Buompadre is the head of that group, the Association of Professional Lawyers for Animal Rights. After Friday's ruling, he called for an inquiry into animal cruelty in Argentina.

"We believe incarceration and animal cruelty are not fair. We ask that it be investigated, but so far we have obtained an unprecedented ruling," Buompadre said, according to the Buenos Aires Herald.

The attorney who represented Sandra, Andrés Gil Dominguez, says the case sets an important precedent.

"From this ruling forward," Gil Dominguez tells the AP, "the discussion will be whether captivity in itself damages their rights."

We've touched on animal rights in several recent stories, including the case of Raju the elephant, who famously seemed to weep this summer when he was freed from shackles after 50 years. Earlier this month, an Indian court said Raju could stay with the group that rescued him.

And in August, a spat between British photographer David Slater and Wikimedia over who owns the copyright to a photo taken with Slater's camera — by a grinning black macaque — highlighted the question of animal authorship and copyright.

Copyright 2016 NPR. To see more, visit