Spock, the National Zoo’s only Sulawesi macaque, was euthanized on Thursday after suffering from diabetes. He was 27 years old; the median lifespan for his species is about 18 years, according to the Zoo.

The Zoo remembered Spock in a press release as a primate who enjoyed basking in the sun, taught visitors about Sulawesi macaque family structure and entertained them by smacking his lips when they came to see him.

Spock lived at the Oregon Regional Primate Center for the first eight years of his life, then was donated to the National Zoo along with several other Sulawesi macaques. He was the last surviving member of that group.

The Sulawesi macaque, one of 22 species of macaque, is a primate with limbs of equal length, almost no tail and a tuft of long hair. A target of illegal hunting for meat and trading as pets, the species is considered critically endangered.

In 2003 and 2004, Zoo veterinarians performed orthopedic surgery on Spock to help him handle his arthritis in his knees and ankles. The pins and screws inserted in his joints improved his mobility.

More recently, he was diagnosed with diabetese mellitus, according to the Zoo’s press release. Though veterinarians, keepers and nutritionists helped him, he lost mobility, appetite and weight over the past few months.