A police officer in Pennsylvania will not be charged after shooting and wounding an unarmed man in the torso in the “honest but mistaken” belief he was using a Taser, the authorities said.

In a letter to the police chief of New Hope, a town about 40 miles northeast of Philadelphia, District Attorney Matthew D. Weintraub of Bucks County said the shooting of the man, Brian Riling, “was neither justified, nor criminal, but was excused.”

The officer violated a department rule that a Taser be worn on the opposite hip from a firearm, but he “did not possess the criminal mental state required to be guilty of a crime under state law,” Mr. Weintraub said in a statement that quoted his letter to the police chief.

The statement refers to a Pennsylvania law that states that a person cannot be charged with a crime “if he makes a mistake as a matter of fact for which there is a reasonable explanation or excuse.”