SAN FRANCISCO -- A lawsuit over who owns the copyright to selfie photographs snapped by a monkey has ended in a settlement before a federal court could answer the novel legal question.

Lawyers for an animal-rights group said Monday that they would ask a federal appeals court to dismiss the case. They say photographer David Slater, whose camera was used to take the photo, agreed to donate 25 percent of any future revenue to charities dedicated to protecting crested macaques.

The People for the Ethical Treatment of Animals sued on behalf of the macaque monkey in 2015. It sought financial control of the photographs for the benefit of the monkey named Naruto.

Get Breaking News Delivered to Your Inbox

Naruto lives in a rainforest reserve on the island of Sulawesi in Indonesia. He took the selfies in 2011 with a camera that Slater, a British wildlife photographer, had set up in the reserve. Slater later published the photos in a book.

A joint statement posted to PETA's website Monday read: "PETA and David Slater agree that this case raises important, cutting-edge issues about expanding legal rights for nonhuman animals, a goal that they both support, and they will continue their respective work to achieve this goal."

A lower court ruled in the photographer's favor, and the San Francisco-based 9th U.S. Circuit Court of Appeals was considering PETA's appeal.