A judge in Argentina ruled that a chimpanzee which spent years living in a secluded cage has legal rights and should be released from the zoo, The Independent reported.

The Association of Professional Lawyers for Animal Rights (AFADA) filed the case of Cecilia the chimpanzee to the court in Mendoza, arguing her confinement without companionship was “unlawful” and had a detrimental impact on her health.

The judge decided that the chimpanzee should be transferred into Brazilian rehabilitation center for monkeys, the conditions in which practically identical terms of wildlife.