Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SAN FRANCISCO — Monkey see. Monkey sue. Monkey settle.

Attorneys representing a macaque monkey have agreed to a compromise in a case where they asserted the animal owned the copyright to selfie photos it had shot with a photographer's camera.

Under the deal, the photographer agreed to donate 25 percent of any future revenue from the images to charities dedicated to protecting crested macaques in Indonesia, said the lawyers from People for the Ethical Treatment of Animals who filed the lawsuit.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Attorneys for the group and the photographer, David Slater, on Monday asked the San Francisco-based 9th U.S. Circuit Court of Appeals to dismiss the case and throw out a lower-court decision that said animals cannot own copyrights.

Andrew J. Dhuey, an attorney for Slater, declined to comment on how much money the photos have generated or whether Slater would keep all of the remaining 75 percent of future revenue.

"PETA and David Slater agree that this case raises important, cutting-edge issues about expanding legal rights for non-human animals, a goal that they both support, and they will continue their respective work to achieve this goal," Slater and PETA said in a joint statement.

There was no immediate ruling from the 9th Circuit on the dismissal.

PETA sued on behalf of the monkey in 2015, seeking financial control of the photographs for the benefit of the monkey named Naruto that snapped the photos with Slater's camera.

Lawyers for Slater argued that his company, Wildlife Personalities Ltd., owns worldwide commercial rights to the photos, including a now-famous selfie of the monkey's toothy grin.

The photos were taken during a 2011 trip to Sulawesi, Indonesia, with an unattended camera owned by Slater. Slater said the British copyright obtained for the photos by Wildlife Personalities should be honored worldwide.

U.S. District Judge William Orrick said in a ruling in favor of Slater last year that "while Congress and the president can extend the protection of law to animals as well as humans, there is no indication that they did so in the Copyright Act." The 9th Circuit was considering PETA's appeal.

The lawyers notified the appeals court on Aug. 4 that they were nearing a settlement and asked the judges not to rule. A three-judge panel of the 9th Circuit heard oral arguments in the case in July.