A court in Argentina has granted basic human rights to a shy orangutan who has spent the last 20 years in a Buenos Aires zoo.
Lawyers argued that although Sandra the orangutan is not human, she should be given legal rights.
They claimed that she was being illegally detained at the zoo.
According to the BBC, the case hung on whether the animal was a "thing" or a "person".
Lawyers for Argentina's Association of Professional Lawyers for Animal Rights (Afada) said Sandra was "a person" in the philosophical, not biological, sense.
She will now be transferred to a sanctuary in Brazil where she will enjoy greater freedom, as long as there is no appeal on the case.
Sandra was transferred to the Buenos Aires zoo in 1994 and regularly tried to avoid the public in her enclosure.
Lawyers argued that she was in a situation of illegal deprivation of freedom as a "non-human person".
In a landmark ruling that could pave the way for more lawsuits, the Association of Officials and Lawyers for Animal Rights (AFADA) argued the ape had sufficient cognitive functions and should not be treated as an object, reports the Telegraph.
The Buenos Aires zoo has 10 working days to seek an appeal.
Orangutan 'chews off own hand' to escape jungle snare
Orangutan rescued by charity after being tied up by villagers in Borneo