Scientists have settled a decades-old mystery by naming a cause of death for Japan's most famous dog, Hachiko, whose legendary loyalty was immortalized with a statue outside Shibuya Station in Tokyo.

Hachiko died of cancer and worms, not because he swallowed a yakitori skewer that ruptured his stomach — as legend has it.

For years, Hachiko used to wait at Shibuya Station for his master, Hidesaburo Ueno, a professor at the University of Tokyo. Even after Ueno died, the dog went to the station to wait for his master every afternoon for a decade until he finally died.

Tokyo residents were so moved that they built a statue of Hachiko, which remains a popular rendezvous spot to this day. He was also the hero of children's books.

The dog's story was made into a movie in 1987, "Hachiko Monogatari," which in turn was remade by Hollywood in 2009 as "Hachiko: A Dog's Story," starring Richard Gere.

Hachiko was considered such a model of devotion that his organs were preserved when he died in 1935.

Rumor had it that Hachiko died after wolfing down a yakitori skewer that ruptured his stomach. But University of Tokyo veterinarians examining his organs said Wednesday that Hachiko had terminal cancer as well as a filaria infection — worms.

Four yakitori sticks remained in Hachiko's stomach, but they didn't damage his stomach or cause death, said Kazuyuki Uchida, one of the veterinarians.