Ayoniso-manasikāra Sutta (SN 9:11)
I have heard that on one occasion a certain monk was staying among the Kosalans in a forest grove. Now at that time, he spent the day’s abiding thinking evil, unskillful thoughts: i.e., thoughts of sensuality, thoughts of ill will, thoughts of doing harm.
Then the devatā inhabiting the forest grove, feeling sympathy for the monk, desiring his benefit, desiring to bring him to his senses, approached him and addressed him with this verse:
“From inappropriate attention
you’re being chewed by your thoughts.
Relinquishing what’s inappropriate,
Keeping your mind on the Teacher,
the Dhamma, the Saṅgha, your virtues,
you will arrive at
you will put an end
to suffering & stress.”
The monk, chastened by the devatā, came to his senses.