It shall be unlawful for any person under 18 years of age to knowingly and intentionally possess or transport a handgun or assault firearm anywhere in the Commonwealth. For the purposes of this section, “handgun” means any pistol or revolver or other firearm originally designed, made and intended to fire single or multiple projectiles by means of an explosion of a combustible material from one or more barrels when held in one hand and “assault firearm” means any (i) semi-automatic centerfire rifle or pistol which expels single or multiple projectiles by action of an explosion of a combustible material and is equipped at the time of the offense with a magazine which will hold more than 20 rounds of ammunition or designed by the manufacturer to accommodate a silencer or equipped with a folding stock or (ii) shotgun with a magazine which will hold more than seven rounds of the longest ammunition for which it is chambered. A violation of this section shall be a Class 1 misdemeanor.
This section shall not apply to:
1. Any person (i) while in his home or on his property; (ii) while in the home or on the property of his parent, grandparent, or legal guardian; or (iii) while on the property of another who has provided prior permission, and with the prior permission of his parent or legal guardian if the person has the landowner’s written permission on his person while on such property;
2. Any person who, while accompanied by an adult, is at, or going to and from, a lawful shooting range or firearms educational class, provided that the weapons are unloaded while being transported;
3. Any person actually engaged in lawful hunting or going to and from a hunting area or preserve, provided that the weapons are unloaded while being transported; and
4. Any person while carrying out his duties in the Armed Forces of the United States or the National Guard of this Commonwealth or any other state.