According to post-canonical Sutta Nipata commentary, the background story for the Karaniya Metta Sutta (Karaneeya Meththa Suthraya) is that a group of monks were harassed by tree-dwelling deities in a forest; when the monks seek the Buddha's aid in dealing with the deities, the Buddha teaches the monks the Karaniya Metta Sutta (Karaneeya Meththa Suthraya) for them to recite regularly; the monks do so and, as a result, win over the deities' good will.
![](https://i.ytimg.com/vi/2mXrNF9xmyo/maxresdefault.jpg)