A 47-year-old Asian elephant who has resided at the Bronx Zoo does not have the same constitutional rights as a person, New York's top court ruled on Tuesday. 

The case stemmed from a challenge to the ongoing confinement since 1977 by the Nonhuman Rights Project, which had petitioned the zoo to recognize the elephant, named Happy, as a legal person. 

The group had argued earlier this month that Happy should be released under the writ of habeas corpus, which bars against illegal custody or imprisonment. 

But the court in a 5-2 ruling determined Happy does not have the same rights a human. 

"Because the writ of habeas corpus is intended to protect the liberty right of human beings to be free of unlawful confinement, it has no applicability to Happy, a nonhuman animal who is not a 'person' subjected to illegal detention," Chief Judge Janet DiFiore wrote in the majority opinion. "Thus, while no one disputes that elephants are intelligent beings deserving of proper care and compassion, the courts below properly granted the motion to dismiss the petition for a writ of habeas corpus, and we therefore affirm."

In a dissenting opinion, Judge Jenny Rivera disagreed, calling Happy's ongoing captivity with the zoo inhumane. 

"Happy’s confinement by human beings has never been intended to benefit her but serves only to entertain and satisfy human curiosity, regardless of the loss of freedom to Happy," Rivera wrote. "She is held in an environment that is unnatural to her and that does not allow her to live her life as she was meant to: as a self-determinative, autonomous elephant in the wild."

Happy was born in the wild in 1971 and is one of two Asian elephants at the zoo. The Nonhuman Rights Project, which has filed similar animal rights cases in court over the years, had sought for Happy to be released to animal sanctuaries in either Tennessee or California. 

Officials at the zoo had argued Happy is well fed and cared for and looked after by trained veterinarians at a certified facility while also protected by the Animal Welfare Act.