SAN FRANCISCO — U.S. copyright law does not allow lawsuits claiming animals have copyrights to photographs, a U.S. appeals court ruled Monday in a case over selfies taken by a monkey.

The decision by the 9th U.S. Circuit Court of Appeals upheld a lower court ruling in favor David Slater, the photographer whose camera was used to take the photos.

The appeals court said U.S. copyright law confers the right to sue on humans.

The monkey, a crested macaque named Naruto, snapped the photos in 2011 with an unattended camera.

Slater was on a trip to Sulawesi, Indonesia, and argued that his company, Wildlife Personalities Ltd., owned worldwide commercial rights to the photos, including a now-famous selfie of the monkey’s toothy grin.

The People for the Ethical Treatment of Animals sued on behalf of the monkey in 2015, seeking financial control of the photographs for the benefit of the animal.

U.S. District Judge William Orrick said in a ruling in 2016 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 appealed that ruling to the 9th Circuit.

Following oral arguments, Slater and PETA announced in September that they had reached a settlement under which Slater agreed to donate 25 percent of any future revenue from the images to charities dedicated to protecting crested macaques in Indonesia.

They asked the 9th Circuit to dismiss the case and throw out Orrick’s decision.

But the court refused, saying a decision in this “developing area of the law” would help guide lower courts and considerable public resources had been spent on the case.

The 9th Circuit also said refusing to dismiss the case “prevents the parties from manipulating” the precedent set by the judge.