The phrase does not appear in the Hebrew Bible but first appears in rabbinic texts, such as the Talmud and Mishna, of the early centuries ce. In those texts it is often used in the context of maintaining social order, such as through legal matters of fairness and restitution. It was first invoked in a theological context in the ʿAleinu prayer, written in the 3rd century ce, which later became the closing prayer of the thrice-daily liturgy.