The phrase originated in beth din courts in the Kingdom of Israel as a way to attribute God as the highest authority in law.
[2][3] However, in later times, particularly in the United States, it has only been said as a result of legal tradition where the religious meaning and origin is not founded on belief.
During the 17th century in the Massachusetts Bay Colony, the Puritan majority of judges at the time did not believe that stating "may God have mercy on your soul" had any meaning unless the accused had made a confession of the crime in open court.
They, and other Puritan office holders, would also regularly press the condemned up until the point of execution to make a confession of the crime they had been convicted of to ensure that the phrase satisfactorily had meaning according to their views.
However, when the first death sentence was passed in Taos County, New Mexico, the judge used the phrase but immediately followed it with a statement that the court would not be responsible for asking "an all wise providence" to do something the jury could not do due to the American principle of separation of church and state.
[17] In the 19th century, due to American law moving away from moral judgments based on Christian principles towards the principle of a judgment that was "beyond reasonable doubt", the phrases "not having the fear of God before your eyes" and "may God have mercy upon your soul" were the very few remainders within the American court system of the British colonial morality-based trials.
[18] Despite this, "may God have mercy on your soul" has been used as a closing statement in modern times by American judges when passing a sentence of death.