Magistrate upholds complaints of animal cruety in banning the eating of felines at annual Curruñao festival in San Luis, south of Lima

Along with rhythms of African-Peruvian music, as well as the drinking and the dancing, a cat race in which the losers wound up in the pot was the highlight of the annual festival of Curruñao in the small town of San Luis, 140km south of Lima.

Not any more. A provincial judge has banned the eating of cats and suspended the cat race at the festival held every September, upholding complaints of animal cruelty made by the animal rights commission at Lima's Law Society.

In her ruling, magistrate Maria Luyo said the event "fomented violence based on cruel acts against animals which caused grave social damage and damaged public health".

She added that minors could be "psychologically damaged" watching the events, which include not only the cat race but also, allegedly, cats being tied to fireworks and the drowning and skinning of the felines for a range of stews and other dishes.

Sonia Cordova, president of the animal rights commission, said the Curruñao festival "tortured and blew up cats so they could later be eaten".

The custom, say locals, dates back to colonial times and is an integral part of the religious celebrations of Santa Efigenia, an African-Peruvian folk saint who tradition holds is of Ethiopian origin. The eating of cats is a dying tradition among Peru's African-descended population – how it started is unknown although some historians say it was born out of necessity by African slaves working on sugar-cane plantations.

Delia Solorzano, the mayor of San Luis, the tiny town at the centre of the controversy, told local media the cat-eating custom "through years of repetition has become part of our local identity".

The mayor of the nearby town of La Quebrada, Yolanda Medina, told local radio that the festival organisers would respect the magistrate's ruling. However, she defended the tradition, saying the cats were specially bred for the occasion and only an handful were killed to be eaten.

Animal rights campaigners in Peru have greeted the legal ruling as a victory. Corinne Schirmer, of Peru's United Association for Animals , said more than 60,000 signatures had been collected calling for a ban on the "retrograde custom".

Last month, Congressman Juan Urquiza wrote to Solorzano and Peru's health minister to demand a ban on cat-eating under a domestic animal protection law. The minister, Midori de Habich, said the eating of cats should be suspended but took no further action.