I have heard that on one occasion the Blessed One was staying near Savatthi, in Jeta's Grove, Anathapindika's monastery. Now at that time Bahiya of the Bark-cloth was living in Supparaka by the seashore. He was worshipped, revered, honored, venerated, given homage -- a recipient of robes, almsfood, lodgings, and medical requisites for the sick. Then, when he was alone in seclusion, this line of thinking arose to his awareness: "Now, of those who in this world are arahants or have entered the path of arahantship, am I one?"
Then a devata who had once been a blood relative of Bahiya of the Bark-cloth -- compassionate, desiring his welfare, knowing with her own awareness the line of thinking that had arisen in his awareness -- went to where he was staying and on arrival said to him: "You, Bahiya, are neither an arahant nor have you entered the path of arahantship. You don't even have the practice whereby you would become an arahant or enter the path of arahantship."
"But who, living in this world with its devas, is an arahant or has entered the path to arahantship?"
"Bahiya, there is a city in the northern country named Savatthi. The Blessed One -- an arahant, rightly self-awakened -- is living there now. He is truly an arahant and he teaches the Dhamma that leads to arahantship. "
Then Bahiya, deeply chastened by the devata, left Supparaka right then and, in the space of one day and night, went all the way to where the Blessed One was staying near Savatthi, in Jeta's Grove, Anathapindika's monastery. At that time, a large number of monks were doing walking meditation in the open air. He went to them and, on arrival, said, "Where, venerable sirs, is the Blessed One staying -- the arahant, right self-awakened? We want to see him."
"He has gone into the town for alms."
Then Bahiya, hurriedly leaving Jeta's Grove and entering Savatthi, saw the Blessed One going for alms in Savatthi -- calm, calming, his senses at peace, his mind at peace, tranquil and poised in the ultimate sense, accomplished, trained, guarded, his senses restrained, a Great One (naga). Seeing him, he approached the Blessed One and, on reaching him, threw himself down, with his head at the Blessed One's feet, and said, "Teach me the Dhamma, O Blessed One! Teach me the Dhamma, O One-Well-Gone, that will be for my long-term welfare and bliss."
When this was said, the Blessed One said to him: "This is not the time, Bahiya. We have entered the town for alms."
A second time, Bahiya said to the Blessed One: "But it is hard to know for sure what dangers there may be for the Blessed One's life, or what dangers there may be for mine. Teach me the Dhamma, O Blessed One! Teach me the Dhamma, O One-Well-Gone, that will be for my long-term welfare and bliss."
A second time, the Blessed One said to him: "This is not the time, Bahiya. We have entered the town for alms."
A third time, Bahiya said to the Blessed One: "But it is hard to know for sure what dangers there may be for the Blessed One's life, or what dangers there may be for mine. Teach me the Dhamma, O Blessed One! Teach me the Dhamma, O One-Well-Gone, that will be for my long-term welfare and bliss."
"Then, Bahiya, you should train yourself thus: In reference to the seen, there will be only the seen. In reference to the heard, only the heard. In reference to the sensed, only the sensed. In reference to the cognized, only the cognized. That is how your should train yourself. When for you there will be only the seen in reference to the seen, only the heard in reference to the heard, only the sensed in reference to the sensed, only the cognized in reference to the cognized, then, Bahiya, there is no you in terms of that. When there is no you in terms of that, there is no you there. When there is no you there, you are neither here nor yonder nor between the two. This, just this, is the end of stress."
Through hearing this brief explanation of the Dhamma from the Blessed One, the mind of Bahiya of the Bark-cloth right then and there was released from the effluents through lack of clinging/sustenance. Having exhorted Bahiya of the Bark-cloth with this brief explanation of the Dhamma, the Blessed One left.
Now, not long after the Blessed One's departure, Bahiya -- attacked by a cow with a calf -- lost his life. Then the Blessed One, having gone for alms in Savatthi, after the meal, returning from his alms round with a large number of monks, saw that Bahiya had died. On seeing him, he said to the monks, "Take Bahiya's body and, placing it on a litter and carrying it away, cremate it and build him a memorial. Your companion in the holy life has died."
"As you say, lord," the monks replied. After placing Bahiya's body on a litter, carrying it off, cremating it, and building him a memorial, they went to the Blessed One and, on arrival, having bowed down to him, sat to one side. As they were sitting there, they said to him, "Bahiya's body has been cremated, lord, and his memorial has been built. What is his destination? What is his future state?"
"Monks, Bahiya of the Bark-cloth was wise. He practiced the Dhamma in accordance with the Dhamma and did not pester me with issues related to the Dhamma. Bahiya of the Bark-cloth, monks, is totally unbound."
Then, on realizing the significance of that, the Blessed One on that occasion exclaimed:
Where water, earth, fire, & wind have no footing:
There the stars do not shine,
the sun is not visible,
the moon does not appear,
darkness is not found.
And when a sage,
a brahman through sagacity,
has known [this] for himself,
then from form & formless,
from bliss & pain,
he is freed.