Then despite the US Copyright Office ruling that animals could not own copyright, an American charity, People for the Ethical Treatment of Animals (PETA), entered the fray.
It sued Slater in 2015, arguing that the copyright belonged to one of the macaques, Naruto.
In a bizarre hearing in San Francisco, lawyers argued not only whether a monkey could claim copyright but whether Naruto was even the correct monkey.
Slater, who said he made around £100 every few months from image sales of the grinning monkey, was confronted with legal bills running into thousands of pounds.
Facing financial ruin he even considered giving up wildlife photography and becoming a tennis coach or dog walker instead.
Finally, agreement has been reached.
In a joint statement, Peta and Slater said that the case raised "cutting edge issues" about the legal rights of non-human animals.
"We must recognise appropriate fundamental legal rights for them as our fellow global occupants and members of their own nations who want only to live their lives and be with their families."
Lawyers for the group and Slater asked the San Francisco-based 9th US Circuit Court of Appeals to dismiss the case and throw out a lower court decision that said animals cannot own copyrights.
Slater had argued that his company, Wildlife Personalities Ltd., owns worldwide commercial rights to the photos, including the now-famous selfie of the monkey's toothy grin.
US District Judge William Orrick said in a ruling in favour of Mr 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 August 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.