The thirty-second sutta of the Digha Nikāya, preached at the Gijjhakūta (D.iii.194ff).
The Four Great Kings (Cattāro Mahārājāno) having set a guard over the four quarters, visited the Buddha. Having saluted him and sat down with hosts of other Yakkhas, Vessavana told the Buddha that the Yakkhas did not, for the most part, believe in the Buddha for the reason that they did not find it pleasant or agreeable to abstain from the things which he declared to be evil - such as the taking of life, theft, etc. And in order that the Buddha's disciples, haunting lonely and remote parts of the forest where the Yakkhas dwelt, might find protection from them, Vessavana suggested that the Buddha might learn the ātānātiya word-rune (rakkha). The Buddha agreeing, Vessavana proceeded to recite it.
It opens with a salutation to the seven Buddhas, beginning with Vipassī. The remainder contains a list of the gods and other superhuman beings, the Four Great Kings heading the list; these last are described at some length; forty-one other gods are mentioned as a kind of appendix or afterthought, all mentioned one after another with no attempt at group division and without any details, in what are, apparently, mnemonic doggerels.
A part of the Mahāsamaya Sutta (sections 10-20) looks very much like an improved and enlarged edition of this list of bare names.
The Buddha learnt the word-rune and taught it to the monks.
The ātānātiya Sutta is now regarded as a Paritta, and its influence pervades a hundred million world systems (VibhA.430).
In Ceylon, for instance, it is recited with great fervour at the conclusion of the Paritta ceremonies, particularly in times of illness, in order to ward off evil spirits.
It is included in the list of Parittas found in the Milinda-pañha, p.151; on the importance of this Sutta in the history of India, see Rhys Davids, Buddhist India, pp.219-37.
DA.iii.969 gives a long description of the ritual to be followed when reciting the Atānātiya Paritta.