2904. Interference with custody of children
(a) Offense defined.–A person commits an offense if he knowingly or recklessly takes or entices any child under the age of 18 years from the custody of its parent, guardian or other lawful custodian, when he has no privilege to do so.
(b) Defenses.–It is a defense that:
(1) the actor believed that his action was necessary to preserve the child from danger to its welfare; or
(2) the child, being at the time not less than 14 years old, was taken away at its own instigation without enticement and without purpose to commit a criminal offense with or against the child; or
(3) the actor is the child’s parent or guardian or other lawful custodian and is not acting contrary to an order entered by a court of competent jurisdiction.
(c) Grading.–The offense is a felony of the third degree unless:
(1) the actor, not being a parent or person in equivalent relation to the child, acted with knowledge that his conduct would cause serious alarm for the safety of the child, or in reckless disregard of a likelihood of causing such alarm. In such cases, the offense shall be a felony of the second degree; or
(2) the actor acted with good cause for a period of time not in excess of 24 hours; and
(i) the victim child is the subject of a valid order of custody issued by a court of this Commonwealth;
(ii) the actor has been given either partial custody or visitation rights under said order; and
(iii) the actor is a resident of this Commonwealth and does not remove the child from the Commonwealth.
In such cases, the offense shall be a misdemeanor of the second degree.