Believed to be one of the world's smartest gorillas, Koko communicates with sign language at the Gorilla Foundation in California, and met Robin when they paired up for a video shoot over ten years ago.
The actor and gorilla bonded as they met on set, hugging, wrestling, and even getting into a tickling fight during their time together.
Dr Penny Patterson, who is the gorilla's foster mum, explained that the animal's affinity for Robin was clear from the outset.
'Koko instantly connected with Robin. Koko, like us, can sense a person's nature and in this case, she was quickly drawn to Robin's warm heart.'
The Gorilla Foundation has now revealed the moment she told Koko of Robin's passing, and it is heartbreaking.
'After the first call, Koko came to Dr Patterson with an inquiring look on her face,' read a press release from the sanctuary.
'Dr Patterson explained that we had lost a dear friend, Robin Williams. Koko was quiet and looked very thoughtful.'
However as more calls came in, the Gorilla realised she had lost the friend she'd made years ago.
'At the end of the day, Koko became very sombre, with her head bowed and her lip quivering.'