A rat trap (1) which comprises a plate (2) with a first side and a second side and with a number of through-going openings from the first to the second side. The trap has a number of spikes (3) secured to an anchoring plate (4) arranged on the top face of said plate and wherein each spike is adapted to the individual openings in the plate to the effect that a spike is able to slide through the plate. The plate (2) has an infrared sensor adapted to detect the presence of a rat within the reach of the spikes. The rat trap further comprises a withdrawal mechanism which, following a given period of time, withdraws the spikes through the openings in the plate whereby the rat spiked by one or more spikes (3) is released.