A federal judge in San Francisco has sided with the Cincinnati Zoo in its dispute with a Bay Area nonprofit over the fate of longtime companion of Koko, the western lowland gorilla who famously learned sign language.

In a decision issued Friday, U.S. District Judge Richard Seeborg ordered The Gorilla Foundation, the Redwood City nonprofit that cared for Koko until her death in June 2018, to begin working with the zoo to arrange the transfer of Ndume, Koko’s male companion.