Excommunication, the exclusion from a religious community, is most often used by Catholicism, Orthodoxy and Judaism as a punitive measure for political purposes.
Public excommunication was once one of the most dreaded penalties in the mediaeval penal system. Both the Anglican and the Catholic churches derive their present rules on excommunication from mediaeval canon law. Excommunication imposed by a church court or by a bishop in the past could have led to the death penalty or life imprisonment with confiscation of property.
Historical examples of excommunication include Pugachev and Tolstoy being excommunicated from the Russian Orthodox Church, Huss and Bruno excommunicated by the Catholic Church, and Spinoza being excommunicated from Judaism. A recent excommunication in the Roman Catholic Church involved a person in the southern USA who, in the 1960s, publicly opposed the racial integration of church schools.