Japan is home to many local festivals, but some of the best known are the ones in which men run and jump around nearly naked — not for dirty reasons, but for ancient religious ones.

The hadaka matsuri or "naked festival" dates back centuries in Japan. Men perform in traditional fundoshi (loincloth) to purify themselves before gods, to bring luck and prosperity or to welcome new seasons.

To see one for myself, I headed in early July to Shimadachi, a village high up in the Japanese Alps — where elementary schoolboys keep up the tradition of marching around town in only loincloth.

While perhaps strange if you've got a Western sensibility, the practice is rather routine and vaunted here. It is believed that nearly 300 years ago, evil spirits had sickened the townsfolk with disease. When the village boys paraded around wearing loincloth, prayed to the Shinto god of health at a small temple and then purified themselves publicly before the gods, they were able to ward off disease, driving out those evil spirits.

No one wants to be the one to stop a centuries-old tradition, so the hadaka matsuri continues. I followed along as nearly 90 boys prayed two-by-two at a small Shinto temple, then shouldered giant flags mounted on bamboo and marched around their town this way for nearly two hours. (They did get a break in a nearby auto repair shop, to fuel up with some snacks).

But the most fun for the kids came at the end. After hours in the nearly 90-degree heat, they were able to perform the purification part of the ceremony by jumping together into a shallow pond — so shallow that once the boys jumped in, it was just a giant puddle of mud.

It's an old tradition that, for the kids of Shimadachi, never gets old.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.