A court in Argentina has ruled that a shy orangutan who spent the last 20 years in a zoo can be granted some legal rights enjoyed by humans.
Lawyers had appealed to free Sandra from the Buenos Aires zoo by arguing that although not human, she should be given legal rights.
They had argued that she was being illegally detained.
If there is no appeal, the ape will be transferred to a sanctuary in Brazil where she will enjoy greater freedom.
The singular 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 was, they argued, in a situation of illegal deprivation of freedom as a "non-human person".
They had filed a "habeas corpus" writ in her favour last November over "the unjustified confinement of an animal with probable cognitive capability".
The court judges had rejected the writ several times before deciding finally that Sandra could be considered to have rights to freedom which needed defending.
She regularly tried to avoid the public in her enclosure.
If there is no appeal against the court's decision from the Buenos Aires zoo, she will be transferred to a primate sanctuary in Brazil where she can live in partial liberty