An orangutan in an Argentine zoo can be freed and sent to a sanctuary after a court recognized the ape as a "non-human person" unlawfully deprived of its freedom, local media reported on Sunday.

Animal rights campaigners filed a habeas corpus petition — a document more typically used to challenge the legality of a person's detention — in November on behalf of Sandra, a 29-year-old Sumatran orangutan at the Buenos Aires zoo.

The Association of Officials and Lawyers for Animal Rights argued the ape had sufficient cognitive functions and should not be treated as an object.

The court agreed Sandra, born into captivity in Germany, deserved the basic rights of a "non-human person."

"This opens the way not only for other Great Apes, but also for other sentient beings which are unfairly and arbitrarily deprived of their liberty in zoos, circuses, water parks and scientific laboratories," the daily La Nacion newspaper quoted AFADA lawyer Paul Buompadre as saying.

A U.S. court this month tossed out a similar bid for the freedom of 'Tommy' the chimpanzee, privately owned in New York state, ruling the chimp was not a "person" entitled to the rights and protections afforded by habeas corpus.