Monday brought a settlement in a highly-watched copyright lawsuit over who holds the rights to selfie photographs taken by a monkey. The deal comes ahead of trial, in which the case was slated to go before San Francisco-based 9th U.S. Circuit Court of Appeals. Under the deal, the AP states, “the photographer whose camera was used to take the photos agreed to donate 25 percent of any future revenue from the images to charities dedicated to protecting crested macaques in Indonesia, lawyers for an animal-rights group said.” 

The case got its start in 2015 when People for the Ethical Treatment of Animals (“PETA”) filed suit against David Slater, the photographer whose camera was used to capture the selfies. According to PETA, it was bringing the copyright suit on behalf of the monkey named Naruto that snapped the photos with Slater’s camera. Based on the fact that the photos were taken with Slater’s camera, his counsel argued that he and his company, Wildlife Personalities Ltd., were the copyright holders in connection with the images. 

PETA, on the other hand, argued that Naruto should benefit from the images as the copyright holder. As noted by the animal rights group, “Naruto’s case sparked a massive international discussion about the need to extend fundamental rights to animals for their own sake—not in relation to the ways in which they can be exploited by humans.” 

U.S. District Judge William Orrick of the district court ruled in favor of Slater last year, holding 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.” PETA moved to appeal Judge Orrick’s decision. 

In a joint statement on Monday, PETA and David Slater said they “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.”