Animal rights advocates asked a federal appellate panel Wednesday to send the fate of the Miami Seaquarium’s orca Lolita to a bench trial.

The appeal is part of a protracted and emotional debate over the killer whale, which has lived with dolphins in a “small, shallow, barren concrete tank” since the death of her mate in 1980, according to People for the Ethical Treatment of Animals attorney Delcianna Winders.

PETA and other groups argue Lolita should be released to a seaside sanctuary in Washington state, where she was captured in 1970 at about age 5. But many scientists say she would likely have trouble adjusting after so many decades in captivity.

The argument has become more heated as the orca has aged and her fellow Southern resident killer whales have become few and far between. The National Marine Fisheries Service recognized Lolita as endangered in 2015. The Miami Beach City Commission voted symbolically in October to free Lolita.

But the courts hold the power to order Lolita’s transfer, and PETA’s case was dismissed last year at the summary judgment stage by U.S. District Judge Ursula Ungaro in Miami. The 8,000-pound whale was not “gravely threatened” by Seaquarium conditions, which is the applicable standard under the Endangered Species Act, the judge ruled.

“The conditions in which Lolita is kept, and the injuries the plaintiffs have presented to the court, are largely addressed under a different federal law — the Animal Welfare Act,” Ungaro ruled in June 2016. “Under these facts, plaintiffs’ remedy is not under the ESA, but rather with Congress, where their efforts to improve Lolita’s less than ideal conditions can be addressed through legislation.”

The Animal Welfare Act governs the care of captive animals, including enclosure size, feeding, water quality, sanitation and veterinary care, Ungaro found.

Eleventh Circuit Judges Susan Black and Frank Hull and visiting U.S. Court of International Trade Judge Jane Restani took up PETA’s request that the case be remanded for trial solely on the Seaquarium’s compliance with the Endangered Species Act.

The plaintiffs — PETA, the Animal Legal Defense Fund, the Orca Network and orca researcher Howard Garrett —  disagreed with Ungaro’s application of the two laws.

Even if the 13 physical and psychological injuries alleged in the complaint don’t violate the Animal Welfare Act, they can still violate the Endangered Species Act, the plaintiffs claim. Lolita is the only captive orca protected under the ESA based on the depletion of her species.

That law examines whether conditions “harm” and “harass” an animal by looking at three factors: AWA compliance, whether the animal husbandry practices are “generally accepted” and the likely risk of injury, Winders argued. She said the Seaquarium’s compliance is strongly disputed.

“Even as compared to other orcas in captivity, Lolita is unable to swim any meaningful distance” in her 80-foot-long tank, said Winders, a Harvard Law School animal law and policy fellow.

Greenberg Traurig shareholder Elliot Scherker argued on behalf of Seaquarium that the “gravely threatened” standard was correctly applied. Congress did not intend for a judge to substitute for experienced federal agency employees, he said.

“There is no right to bring a private action under the Animal Welfare Act,” he said, calling PETA’s case an “AWA action in an ESA package.”

The judges expressed concern about the proposed sea pen, which has not been built. The pen is funded, but money has not been secured for lifetime care for Lolita. She could live another 40 to 60 years, Winders said.

The sanctuary would be about 100 miles by 100 miles and would allow Lolita to communicate with her family, according to PETA. The orca’s mother is still believed to be alive.

“It seems to me that you can’t see a veterinarian if it’s 100 miles by 100 miles,” Restani said.

Scherker quipped, “Yes, it would be difficult to make a house call.”