Koko, the gorilla who mastered sign language and served as an ambassador for her species, has died.

She passed away in her sleep at the age of 46 on June 20, the Gorilla Foundation said in a statement.

"Koko touched the lives of millions as an ambassador for all gorillas and an icon for interspecies communication and empathy. She was beloved and will be deeply missed," the foundation said.

Koko was a western lowland gorilla. She was originally named Hanabi-ko, which is Japanese for "fireworks child," because she was born on the Fourth of July in 1971 at the San Francisco Zoo.

Dr. Francine "Penny" Patterson began teaching Koko sign language when she was a year old. It was believed that Koko eventually understood more than 2,000 words of spoken English.

Koko became quite a celebrity. She was featured twice on the cover of National Geographic. The first cover, in October 1978 (shown at top), featured a photo that Koko had taken of herself in a mirror.

The second issue, in January 1985, included a story about Koko and her pet kitten, All Ball. A children's book, "Koko's Kitten," was published about Koko and her tiny feline friend. You can learn more about that relationship in the vieo below.

Everyone was a friend, or a fan

But kittens weren't the only ones enamored with Koko. In 2001, the gorilla had a widely shared encounter with actor and comedian Robin Williams. She tried on his glasses, showed him around her enclosure, they made faces at each other, and she even convinced him to tickle her. You can watch them in the video below:

The foundation says it will continue its work on conservation efforts, including a sign language app featuring Koko for the benefit of both children and gorillas.

"Her impact has been profound and what she has taught us about the emotional capacity of gorillas and their cognitive abilities will continue to shape the world," the foundation said.

The foundation says those who wish to send condolences can email kokolove@koko.org.

Thousands of people have been posting on the Gorilla Foundation Facebook page, saddened by Koko's death.

Commented one fan, Anna Kruger, "This makes me so sad. Koko made me cry when she was alive — because I saw how much love she had to give and how kind she was to everyone around her. It was awe inspiring. To have such a gentle soul leave the earth... I am so sad."

Mary Jo DiLonardo writes about everything from health to parenting — and anything that helps explain why her dog does what he does.

Koko the gorilla dies at 46
Koko the gorilla had pet kittens, celebrity friends and served as an ambassador for her species.