Species of Anisakis typically infect the stomach of cetaceans worldwide, often causing ulcerative lesions that may compromise the host's health. These nematodes also cause anisakiasis or allergic reactions in humans. To assess the risks of this emerging zoonosis, data on long-term changes in Anisakis infections in cetaceans are necessary. Here, we compare the prevalence and severity of ulcerative lesions caused by Anisakis spp. in five cetacean species stranded along the north-west Spanish coast in 2017–2018 with published data from 1991–1996. Open ulcers were found in 32/43 short-beaked common dolphins, Delphinus delphis; 3/5 striped dolphins, Stenella coeruleoalba; 1/7 bottlenose dolphins, Tursiops truncatus; and 1/3 harbour porpoises, Phocoena phocoena meridionalis; a single individual of long-finned pilot whale, Globicephala melas, was found uninfected. In common dolphins, the mean abundance of open ulcers per host was 1.1 (95% confidence interval: 0.8–1.3), with a maximum diameter (mean ± standard deviation) of 25.4 ± 16.9 mm. Stomachs with scars or extensive fibrosis putatively associated with Anisakis were detected in 14 and five animals, respectively. A molecular analysis based on the mitochondrial cytochrome c oxidase II gene using 18 worms from three cetacean species revealed single or mixed infections of Anisakis simplex sensu stricto and Anisakis pegreffii. Compared with the period 1991–1996, we found a strong increase of prevalence, abundance and extension of ulcerative lesions in most cetacean species. Anisakis populations could have increased in the study area over the last decades, although we cannot rule out that a higher environmental stress has also boosted the pathological effects of these parasites.