587279 Disclosed is a rat trap (1) comprising a power supply (80) and means (3) for killing a rat. A first sensor is used to detect the presence of a rat in the space within the reach of the killing means and where control means are arranged capable of receiving a signal from the first sensor, and being adapted for activating the killing means (3) to kill the rat when the presence of the rat is detected by the sensor. The trap further comprises a second sensor (85) for detecting light, and the control means is capable of receiving a signal from the second sensor (85) and being adapted for deactivating the killing means (3) or the first sensor for a period of time after the detection of light by the second sensor.