Abstract This work presents the results obtained in a long-term experiment focused on the study of the evolution of cementitious materials immersed in pig slurry at real conditions. Cement mortars were made with four different cement types and immersed in pig slurry for 48 months. Furthermore, to separate pure hydration process from pig slurry effect, mortar samples were immersed in water for 12 months at laboratory conditions. Compressive strength, X-ray diffraction and ultrasonic measurements were made in all samples. Ultrasonic measurements were made from ultrasonic images obtained from automatic ultrasonic inspections. Use of ultrasonic images has allowed the extraction of information about the state of the studied materials. An empirical relationship between ultrasonic velocity and compressive strength has been obtained and the long-term effect of pig slurry on cementitious materials has been determined.