A device for electrocuting pests includes first and second electrodes and an infrared detector. The infrared detector is responsive to infrared radiation emitted by a pest and provides output signals indicating the presence of a pest. A circuit responsive to the output signals and responsive to sensing current flowing between the first and second electrodes, which indicates that a pest is present and in contact with the electrodes, provides high voltage across the first and second electrodes when a selected one of the output signals and the sensing current indicates that a pest is in contact with the electrodes.