In the Roman Catholic Church, the Seal of Confession (or Seal of the Confessional) is the absolute duty of priests not to disclose anything that they learn from penitents during the course of the Sacrament of Penance.
Gratian, who compiled the edicts of previous Catholic Ecumenical Councils and the principles of church law, published the Decretum about 1151. It includes the following declaration of the law as to the seal of confession: "Let the priest who dares to make known the sins of his penitent be deposed." Gratian goes on to say that the violator of this law should be made a lifelong, ignominious wanderer (Secunda pars, dist. VI, c. II).
Canon 21 of the Fourth Council of the Lateran (1215), binding on the whole church, laid down the obligation of secrecy in the following words:
Let the priest absolutely beware that he does not by word or sign or by any manner whatever in any way betray the sinner: but if he should happen to need wiser counsel let him cautiously seek the same without any mention of person. For whoever shall dare to reveal a sin disclosed to him in the tribunal of penance we decree that he shall be not only deposed from the priestly office but that he shall also be sent into the confinement of a monastery to do perpetual penance
Notably, neither this canon nor the law of the Decretum purports to enact for the first time the secrecy of confession. The 15th century English canonist William Lyndwood speaks of two reasons why a priest is bound to keep secret a confession, the first being on account of the sacrament because it is almost (quasi) of the essence of the sacrament to keep secret the confession. (Cf. also Jos. Mascardus, De probationibus, Frankfort, 1703, arg. 378.)
According to Roman Catholic canon law, "The sacramental seal is inviolable; therefore it is absolutely forbidden for a confessor to betray in any way a penitent in words or in any manner and for any reason." (983 §1) The confessor is always an ordained priest, because in the Catholic Church only ordained priests can absolve sins; lay confession is not recognized. Any lay members who overhear a confession (example: a translator) are likewise bound by the seal. (983§2)
Priests may not reveal what they have learned during confession to anyone, even under the threat of their own death or that of others. For a priest to break confidentiality would lead to a latae sententiae (automatic) excommunication, the lifting of which is reserved to the Holy See—in fact, to the Pope himself (Code of Canon Law, 1388 §1). In the Early Modern period, some casuists (Thomas Sanchez, etc.) justified mental reservation, a form of deception which does not involve outright lying, in specific circumstances including when such an action is necessary to protect confidentiality under the seal of the confessional. Other casuists considered "grey areas" in which it was unclear whether or not the seal was being violated. A priest who says "I do not know" is thus to be understood "I do not know with knowledge outside the Seal of the Confessional"; St. Thomas Aquinas goes even farther and says that the priest knows the confession “not as man, but as God knows it”. There are limited cases where portions of a confession may be revealed to others, but always with the penitent's permission and always without actually revealing the penitent's identity.
This is the case, for example, with more serious offenses, as some excommunicable offenses are reserved to the Holy See and their permission to grant absolution must be obtained. In these cases, the priest hearing the confession asks the permission of the penitent to write a petition, using pseudonyms and containing the absolute minimum information necessary, to the bishop or to the Apostolic Penitentiary, the cardinal delegated by the Pope to handle such requests. This request may be forwarded, sealed, through the apostolic delegate or nuncio in a country (the Pope's ambassador), to be guarded by the privilege of a diplomatic pouch. Some of these offenses absolved through the Holy See would be: impersonation of a priest, desecration of the Eucharist, absolving a partner in sin (for example, a priest has an affair and absolves his own mistress), attacking the Pope, heresy, and being involved in an abortion.
Recognition by civil authorities
In a criminal matter, a priest may encourage the penitent to surrender to authorities. In certain very rare cases (according to a priest of the Roman Catholic Diocese of Peoria), if the priest truly feels the person is not contrite (sorry for the sin, either out of respect for God, or more properly, out of sorrow for sin), there are no ameliorating factors (such as age or maturity or addiction) and the priest has evidence of this by the penitent's words, manners, or behaviors, and especially if the sin is very severe and fully deliberate (mortal sin—especially a mortal sin that is punishable by a censure), is very scandalous—such as if the person is a senior public official or a cleric, and the sinning is chronic with no indication whatsoever of positive change or at least the intent to change, the priest may refuse to hear, or to continue to hear, the person's confession. With that being said, however, the Holy See and the Bishops of the world have stressed that that is not to be a norm for these situations, is generally to be discouraged if possible, and should be reserved strictly for rare very serious and scandalous cases. Even then, the seal of the confessional still holds—whatever is said once the encounter begins (by the person going to the confessional area, taking a seat, and closing any door, and the priest saying a greeting and making the sign of the Cross, or the priest praying with and granting absolution to the person before they leave) is still protected from being ever revealed. However, those situations are the extent of the leverage the priest wields. He may not directly or indirectly disclose the matter to civil authorities himself. The doctrine of priest–penitent privilege is respected to varying degrees by the laws of different nations.