He knew his colors and shapes, he learned more than 100 English words, and with his own brand of one-liners he established himself in television shows, scientific reports and news articles as perhaps the world’s most famous talking bird.

But last week Alex, an African gray parrot, died, apparently of natural causes, said Dr. Irene Pepperberg, a comparative psychologist at Brandeis University and Harvard who studied and worked with the parrot for most of his life and published reports of his progress in scientific journals. The parrot was 31.

Scientists have long debated whether any other species can develop the ability to learn human language. Alex’s language facility was, in some ways, more surprising than the feats of primates that have been taught American Sign Language, like Koko the gorilla, trained by Penny Patterson at the Gorilla Foundation/Koko.org in Woodside, Calif., or Washoe the chimpanzee, studied by R. Allen and Beatrice Gardner at the University of Nevada in the 1960s and 1970s.

In 1977, when Dr. Pepperberg, then a doctoral student in chemistry at Harvard, bought Alex from a pet store, scientists had little expectation that any bird could learn to communicate with humans, as opposed to just mimicking words and sounds. Research in other birds had been not promising.