(While the Buddha was staying at Savatthi, a band of monks, having received subjects of meditation from the master, proceeded to a forest to spend the rainy season (vassana). The tree deities inhabiting this forest were worried by their arrival, as they had to descend from tree abodes and dwell on the ground. They hoped, however, the monks would leave soon; but finding that the monks would stay the vassana period of three months, harassed them in diverse ways, during the night with the intention of scaring them away.
Living under such conditions being impossible, the monks went to the Master and informed him of their difficulties. Thereon the Buddha instructed them in the Metta sutta and advised their return equipped with this sutta for their protection.
The monks went back to the forest, and practicing the instruction conveyed, permeated the whole atmosphere with their radiant thoughts of metta or loving-kindness. The deities so affected by this power of love, henceforth allowed them to meditate in peace.
The discourse gets divided into two parts. The first detailing the standard of moral conduct required by one who wishes to attain Purity and Peace, and the second the method of practice of metta).(2)
1. He who is skilled in (working out his own) well being, and who wishes to attain that state of Calm (Nibbana) should act thus: he should be dexterous, upright, exceedingly upright, obedient, gentle and humble.
2. Contented, easily supportable, with but few responsibilities, of simple livelihood, controlled in the senses, prudent, courteous, and not hanker after association with families.
3. Let him not perform the slightest wrong for which wise men may rebuke him. (Let him think:) 'May all beings be happy and safe. May they have happy minds.'
4.& 5. Whatever living beings there may be - feeble or strong (or the seekers and the attained) long, stout, or of medium size, short, small, large, those seen or those unseen, those dwelling far or near, those who are born as well as those yet to be born - may all beings have happy minds.
6. Let him not deceive another nor despise anyone anywhere. In anger or ill will let him not wish another ill.
7. Just as a mother would protect her only child with her life even so let one cultivate a boundless love towards all beings.
8. Let him radiate boundless love towards the entire world - above, below and across - unhindered, without ill will, without enmity.
9. Standing, walking, sitting or reclining, as long as he is awake, let him develop this mindfulness. This, they say, is 'Noble Living' here.
10. Not falling into wrong views - being virtuous, endowed with insight, lust in the senses discarded - verily never again will he return to conceive in a womb.