The viral selfie taken by Naruto the macaque monkey using photographer David J. Slater’s camera is displayed at the Museum of Selfies, in Glendale, Calif., at a March 29 exhibition. (AFP/Getty Images/Robyn Beck)

Naruto, the macaque who lived on the island of Sulawesi, Indonesia, became famous in 2011 when he picked up an unattended camera and started snapping selfies, peering into the camera with a wide, big-toothed grin.

The selfie also managed to spark a three-year legal struggle over whether monkeys can legally own the copyright to photographs.

The monkey, of course, did not start the fight. People for the Ethical Treatment of Animals (PETA) brought the case acting as Naruto’s “next friend,” a legal status reserved for someone who acts in court on behalf of another who is unable to do so, usually because of a disability.

The answer, just to relieve any suspense, was no, monkeys can’t own copyrights or bring copyright infringement suits, a three-judge panel of the U.S. Court of Appeals for the 9th Circuit ruled Monday, upholding a lower court.

That outcome was no surprise. What was unusual was that the appeals court chose to rule on the case at all and the criticism it leveled at PETA in the course of doing so, questioning just what sort of “friend” the organization was to Naruto.

PETA’s target was wildlife photographer David J. Slater, who owned the camera Naruto used, published Naruto’s photos in a book and claimed the copyright.

PETA reached a settlement with Slater in October, requiring him to donate 25 percent of the earnings from his book to charities “that protect the habitat of Naruto and other crested macaques in Indonesia,” as PETA described it. The case could have ended there, after PETA sought to dismiss the appeal, thanks to the settlement. But the court decided to weigh in, anyway.

What really bothered the appeals court judges, they said in a lengthy footnote, was how PETA sought to abandon the case after reaching a settlement that did not directly benefit Naruto and instead served PETA’s “institutional interests,” as Judge Carlos T. Bea said, writing for court.

PETA “failed” as a friend to Naruto, the court said. At one point the court even pondered whether Naruto might have sued PETA for its representation if he were a human.

“Puzzlingly, while representing to the world that ‘animals are not ours to eat, wear, experiment on, use for entertainment or abuse in any other way,’ PETA seems to employ Naruto as an unwitting pawn in its ideological goals,” the court wrote.

The 9th Circuit’s opinion — joined by Judge Eduardo C. Robreno, with Judge N.R. Smith concurring in part — rested on three main points: whether PETA’s relationship with Naruto was significant enough to allow the organization to be his next friend, whether animals can legally bring a case in federal court, and whether they have standing under the Copyright Act.

PETA has long defined itself as “the largest animal rights organization in the world” — but PETA couldn’t prove that it had any special bond with Naruto, compared with the rest of the world’s animals PETA seeks to protect, the court ruled.

Worse, the court said in a lengthy footnote: “We feel compelled to note that PETA’s deficiencies in this regard go beyond its failure to plead a significant relationship with Naruto. Indeed, if any such relationship exists, PETA appears to have failed to live up to the title of ‘friend.’ ”

The 9th Circuit didn’t appear to buy the fact that PETA filed its motion to dismiss Naruto’s appeal because the settlement was reached. Instead, the court surmised PETA must have seen “the proverbial writing on the wall at oral argument,” known it was going to lose, then tried to save itself from an unfavorable opinion by ending the appeal. The settlement, the court argued, could not have benefited Naruto since he was not a party to the settlement and, when it came down to it, Naruto still didn’t own the copyright to profit from his newfound selfie fame.

In fact, the court claimed PETA essentially abandoned Naruto.

“PETA apparently obtained something from the settlement with Slater, although not anything that would necessarily go to Naruto,” the court wrote, proceeding to describe the agreement.

“But now, in the wake of PETA’s proposed dismissal, Naruto is left without an advocate, his supposed ‘friend’ having abandoned Naruto’s substantive claims in what appears to be an effort to prevent the publication of a decision adverse to PETA’s institutional interests,” the court said. “Were he capable of recognizing this abandonment, we wonder whether Naruto might initiate a breach of confidential relationship against his (former) next friend, PETA, for its failure to pursue his interests before its own.”

Nevertheless, PETA still found a glimmer of victory in the 9th Circuit’s ruling.

In a statement released Monday, PETA applauded the 9th Circuit’s reluctant recognition that, because of a precedent involving whales in the 9th Circuit, animals still had constitutional standing to bring a claim in federal court, just not under the Copyright Act, which gives animals no right to sue.

“Today, the court reaffirmed that nonhuman animals have the constitutional right to bring a case to federal court when they’ve been wronged,” PETA general counsel Jeff Kerr said in a statement, “but the opinion still missed the point, which was that Naruto the macaque undeniably took the photos, and denying him the right to sue under the U.S. Copyright Act emphasizes what PETA has argued all along — that he is discriminated against simply because he’s a nonhuman animal.”

Slater, in an email to The Washington Post, said he was “thoroughly delighted” with the outcome of the case and that attorneys’ fees were granted. He had previously argued that PETA couldn’t even bring this copyright case because it had the wrong monkey, claiming the true photographer was a macaque named Ella. The 9th Circuit didn’t address that.

“I can now, hopefully, relax a little and enjoy what I love — being with wildlife,” Slater said.