BIBICLAT, Philippines — Hundreds of Filipino villagers donning capes of banana leaves covered themselves in mud Friday in a ritual to thank their patron saint, John the Baptist, who they believe saved residents from killings by Japanese invaders in World War II.

The “Taong Putik” or “mud people” festival in Bibiclat village in northern Nueva Ecija province dates back to the brutal Japanese occupation of the Philippines, according to villagers.

Japanese troops gathered many of the male villagers in a Bibiclat church courtyard for execution by firing squad. But after women and children prayed to Saint John to spare them, a sudden downpour saved the men, villagers say.

The residents rolled in the mud in jubilation and have carried on the thanksgiving tradition ever since.

“They’re doing it yearly as a vow,” said Bibiclat’s parish priest, the Rev. Elmer Villamayor. “They’re thanking St. John the Baptist for the many blessings they receive from God.”

A mud-splattered participant said he prayed for sick relatives and another thanked God for curing him of an ailment that has crippled him for years.

During the festival, men, women and children — some covered with capes from head to foot and with eyes peering from a cake of mud — collect candles from villagers along Bibiclat’s main street on their way to St. John the Baptist’s church to hear Mass. They light the candles and make wishes.

An impoverished country of more than 100 million people, the Philippines is Asia’s largest Catholic nation.

The annual spectacle, which draws tourists and journalists, reflects the Philippines’ unique brand of Catholicism, which merges church traditions with superstitions.