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 the 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ākanha, 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. But 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. But 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 Ananda (J.iv.180 6).
The barking of Mahākanha was among the four sounds heard throughout Jambudīpa. SNA.i.223; see J.iv.182, where only three are mentioned.