18 Pa.C.S. § 504

This is the official text of 18 Pa.C.S. § 504, part of Pennsylvania’s Pa.C.S — part of the compiled statutory law of Pennsylvania, published by the state as "Pa.C.S." Browse the sections below, each linked to its official government source.

Not legal advice. This page reproduces the official text of a government statute for reference only. Laws change, and how a statute applies depends on your specific facts. For advice about your situation, consult a licensed attorney in your state.

Execution of public duty.

Official statutory text

(a) General rule.--Except as provided in subsection (b) of this section, conduct is justifiable when it is required or authorized by any law of the following:

(1) The law defining the duties or functions of a public officer or the assistance to be rendered to such officer in the performance of his duties.

(2) The law governing the execution of legal process.

(3) The judgment or order of a competent court or tribunal.

(4) The law governing the armed services or the lawful conduct of war.

(5) Any other provision of law imposing a public duty.

(b) Exceptions.--The other sections of this chapter apply to:

(1) The use of force upon or toward the person of another for any of the purposes dealt with in such sections.

(2) The use of deadly force for any purpose, unless the use of such force is otherwise expressly authorized by law or occurs in the lawful conduct of war.

(c) Requisite state of mind.--The justification afforded by subsection (a) of this section applies:

(1) when the actor believes his conduct to be required or authorized by the judgment or direction of a competent court or tribunal or in the lawful execution of legal process, notwithstanding lack of jurisdiction of the court or defect in the legal process; and

(2) when the actor believes his conduct to be required or authorized to assist a public officer in the performance of his duties, notwithstanding that the officer exceeded his legal authority.

Status: in_force · Read it on the official government site

Need a lawyer in Pennsylvania?

Find a Pennsylvania lawyer
About this page: Statute text is reproduced from official government publishers via the Open US Law dataset (Vaquill AI, snapshot v2026.08, CC BY 4.0). Primary legislative text like this is public domain under the government-edicts doctrine (Georgia v. Public.Resource.Org, 2020). We link every section back to its official source so you can verify it independently.