In the past, when the teachings of Kassapa Buddha were already forgotten, there ruled a king named Usīnara. Monks and nuns lived in wickedness, and men followed evil paths, being born, after death, in hell (niraya). Sakka, finding no one entering the deva worlds from among men, decided to scare the men into virtue. Assuming the guise of a forester and leading Mātali disguised as a black fierce looking dog called Mahākaṇha, Sakka came to the city gates and cried aloud that the world was doomed to destruction. The people fled in terror into the city and the gates were shut. However, the forester leapt over the city wall with his dog, the latter scaring everyone he saw. The king shut himself up in his palace, but the dog put his forefeet on the palace window and set up a roar, which was heard from the hells to the highest heavens. The forester said the dog was hungry, and the king ordered food to be given him. However, he ate it all in one mouthful and roared for more. Usīnara then asked the forester what kind of dog it was, and was told that the animal ate up all those who walked in unrighteousness, and described who the unrighteous were. Then having terrified everyone, Sakka revealed himself and returned to his heaven. The king and his people became virtuous, and Kassapa’s religion lasted for one thousand years more.
The story was told in reference to a conversation among the monks to the effect that the Buddha was always working for the good of others, never resting, never tiring, his compassion extended towards all beings. Mātali is identified with Ānanda (J.iv.180‑6).
The barking of Mahākaṇha was among the four sounds heard throughout Jambudīpa. SNA.i.223; see J.iv.182, where only three are mentioned.