During the reign of Kosambika in Kosambí, two brahmins, Dípáyana and Mandavya, gave away their vast wealth and lived for fifty years as ascetics in Himavá. After that, while on a pilgrimage to Benares, they were entertained by a householder who was also named Mandavya. Dípáyana journeyed on while the ascetic Mandavya remained in a cemetery near Benares. There some robbers left some stolen goods outside his hut, and Mandavya, being charged before the king, was impaled, but by virtue of his great powers he continued to live. Dípáyana came to see his friend, and finding him thus and learning that he bore no ill-will towards anyone, took up his abode under his impaled body. Gouts of gore fell from Mandavya's wound on to Dípáyana's golden body and there dried, forming black spots; so he came to be called Kanha-Dípáyana. When the king heard of this, he had Mandavya released with a piece of the stake still inside him, on account of which he came to be called Áni-Mandavya. Dípáyana returned to the householder Mandavya, whose son Yaññadatta he helped to heal by an Act of Truth, the child having been bitten by a snake while playing ball. The lad's parents then performed acts of Truth. In this declaration of Truth it was disclosed that Dípáyana had no desire for the ascetic life, that the father did not believe in the fruits of generosity, and that the mother had no love for her husband. They thereupon admonished each other and agreed to mend their ways.
The Mandavya of the story was Ananda, his wife Visákhá, the son Ráhula, Áni-Mandavya Sáriputta and Kanha-Dípáyana the Bodhisatta (J.iv.27ff). The occasion for the story is the same as that for the Kusa Játaka (q.v.). In one verse Kanha-Dípáyana is addressed merely as Kanha (Ibid., p.33).
The story is also given in the Cariyápitaka (p.99f).