A black macaque with a goofy grin snapped itself in Indonesia while staring down the lens of camera belonging to David Slater in 2011.
After Mr Slater published the pictures in a book, animal rights group People for the Ethical Treatment of Animals (PETA) filed a lawsuit in federal court in San Francisco in 2015 seeking to have the monkey "declared the author and owner of his photograph".
PETA said the selfies were taken by a six-year-old called Naruto on the island of Sulawesi, although even the identity of the monkey was the subject of legal wrangling.
In filing the lawsuit, PETA argued that "US copyright law doesn't prohibit an animal from owning a copyright, and since Naruto took the photo, he owns the copyright, as any human would".
Mr Slater insisted that he owned the rights since he set up the tripod and walked away for a few minutes, only to find out that the monkey had grabbed his camera and snapped away.
Following the settlement, PETA wrote on their blog: "As a part of the arrangement, Mr Slater agreed to donate 25 percent of any future revenue derived from using or selling the monkey selfies to charities that protect the habitat of Naruto and other crested macaques in Indonesia."
It added: "Naruto and the famous 'monkey selfie' photographs that he undeniably took clearly demonstrate that he and his fellow macaques... are highly intelligent, thinking, sophisticated beings worthy of having legal ownership of their own intellectual property and holding other rights as members of the legal community."
A joint statement read: "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."
When the copyright controversy erupted, Mr Slater said that the widespread distribution of the photos online had cost him a lot of money by robbing his book of potential sales, so it's unclear how much money the habitat charities will clear in the deal.
Mr Slater's company Wildlife Personalities, and the self-publishing platform Blurb were co-defendants in the case.