Abstract The sperm whale (Physeter macrocephalus) is one of the largest and most widely distributed marine mammals. The Mediterranean population, classified as Endangered in the IUCN Red List, is affected by a number of anthropogenic threats, including noise increase. The individuals of this species tend to spend long periods “rafting” and socializing at the surface inbetween deep dives and this make them highly vulnerable to ship strikes. In the Pelagos Sanctuary, 8% of photo-identified sperm whales has evidence of wounds from propellers. In the framework of the Life+ Nature WHALESAFE, an interference avoidance system capable of detecting and tracking sperm whales in the range of about 7 km was developed in order to identify the threats and potentially prevent collisions and other risks; this tool issues warning messages in real time to ships. In this work, the technical details of the WHALESAFE detector and of the two reconstruction algorithms developed for the sperm whale tracking will be described. The analysis of a cetacean signal has been used to test the performances of WHALESAFE, revealing that the average error on the position is 50 m at a distance of 1 km. The accuracy in the reconstruction of the cetacean position fits the requirements for an efficient animal tracking and species preservation.