AP

BRONX ZOO ELEPHANT Happy Isn't Legally a Person ... Animal Staying Put

Happy the elephant will NOT be freed from the Bronx Zoo ... after New York's highest court ruled the animal is not legally a person and is thus not being illegally detained.

The ruling from the Court of Appeals came down Tuesday ... a 5-2 decision rejecting an animal rights organization's argument that Happy deserves the same liberty rights as a human.

Youtube/Nonhuman Rights Project

Remember ... the Nonhuman Rights Project sued to get Happy out of the zoo and moved to a more spacious sanctuary, arguing the Asian elephant is worthy of protections afforded to people as a cognitively complex and autonomous animal. Happy was captured in Asia back in the '70s when she was only 1 year old and has been at the Bronx Zoo ever since.

The issue before the court ... whether the writ of habeas corpus -- which humans use to challenge illegal confinement -- should apply to super smart animals like elephants. The judges ruled, no.

It's interesting ... the decision noted the potential snowball effect legally recognizing Happy as a person might have on society, with Chief Judge Janet DiFiore noting there could be "an enormous destabilizing impact on modern society."

However, two judges dissented, saying Happy should not be prevented from having certain liberty rights just because she's an animal.

The NRP tells TMZ ... they applaud the "powerful" dissents from two judges, which shows the struggle for nonhuman animal rights has only just begun.

Click here for info about our online advertising practices.