This Buddhist prayer comes from the Sutta Nipata. Translated by Sogyal Rinpoche (emphasis on the last line is my own).