The Jataka, Vol. II, tr. by W.H.D. Rouse, , at sacred-texts.com
"Virūpakkha snakes I love," etc.--This story the Master told whilst living at Jetavana, about a certain brother.
As he sat, we are told, at the door of his living room, chopping sticks, a snake crept out of a rotten log, and bit his toe; he died on the spot. All the monastery learnt how he had come by his sudden death. In the Hall of Truth
they began talking about it; saying how Brother So-and-so was sitting at his door, chopping wood, when a snake bit him, and he died immediately of the bite.
 The Master came in, and wanted to know what they were discussing as they sat there together. They told him. Said he, "Brethren, if our brother had practised kindness towards the four royal races of serpents, that snake would not have bitten him: wise anchorites in by-gone days, before the Buddha was born, by using kindness to these four royal races, were released from the fear that sprang from these serpents." Then he told them an old-world tale.
Once upon a time, during the reign of Brahmadatta king of Benares, the Bodhisatta came into the world as a young brahmin of Kāsi. When he came of age, he quelled his passions and took upon him the life of an ascetic; he developed the Supernatural Faculties and the Attainments; he built an hermitage by the bend of the Ganges near the foot of Himalaya, and there he dwelt, surrounded by a band of ascetics, lost in the rapture of meditation.
At that time there were many kinds of snakes upon the Ganges bank, which did mischief to the hermits, and many of them perished by snake-bite. The ascetics told the matter to the Bodhisatta. He summoned all the ascetics to meet him, and thus addressed them: "If you showed goodwill to the four royal races of snakes, no serpents would bite you. Therefore from this time forward do you show goodwill to the four royal races." Then he added this verse:--
After thus naming the four royal families of the snakes, he added: "If you can cultivate goodwill towards these, no snake creature will bite you or do you harm." Then he repeated the second verse:--
Having declared the nature of the love within him, he uttered another verse by way of prayer:
Then again, in general terms, he repeated one verse more:--
 Thus did he set forth how one must show love and goodwill to all creatures without distinction; he reminded his hearers of the virtues of the Three Treasures, saying--"Infinite is the Buddha, infinite the Law, and the Order infinite." He said, "Remember the quality of the Three Treasures;" and thus having shown them the infinity of the Three Treasures, and wishing to show them that all beings are finite, he added, "Finite and measurable are creeping things, snakes, scorpions, centipedes, spiders, lizards, mice." Then again, "As the passions and lusts in these creatures are the qualities which make them finite and limited, let us be protected night and day against these finite things by the power of the Three Treasures, which are infinite: wherefore remember the worth of the Three Treasures." Then he recited this stanza:--
 And bidding them also remember the seven Buddhas 2 whilst they did honour, the Bodhisatta composed this guardian charm and delivered it to his band of sages. Thenceforward the sages bore in mind the Bodhisatta's admonition, and cherished love and goodwill, and remembered the Buddha's virtues. As they did this, all the snake kind departed from them. And the Bodhisatta cultivated the Excellencies, and attained to Brahma's heaven.
When the Master had ended this discourse, he identified the Birth:--"The Buddha's followers were then the followers of the sage; and their Teacher was I myself."
100:2 See Cullavagga v. 6 (iii. 75 in Vinaya Texts, S. B. E.), where the verses occur again. The verses partly recur in the 'Bower MS,' a Sanskrit MS lately found in the p. 101 ruins of an ancient city in Kashgaria (see J. P. T. S., 1893, p. 64). The kinds of snakes mentioned cannot be identified. Snake charms are extremely common in Sanskrit; there are many in the Atharva Veda.
102:1 All the verses hitherto given match, and are to be taken together as the "First gāthā." The other is in a different metre, and is the "Second gāthā."
102:2 For the seven Buddhas, see Wilson, Select Works, ii. 5.