Picture a large shrine in Japan on a busy morning. People step up to the front one at a time. Each one bows deeply, twice. Then comes a sound you would not expect in a place of prayer: two sharp claps, loud enough to carry across the courtyard. One more bow, and they step aside for the next person.

If you were standing in line, you probably did the same. It is easy to copy, and it feels good to get right. Then, later that day, you visit a Buddhist temple, step up to pray, and raise your hands to clap. Nobody around you is clapping. They are standing quietly with their palms pressed together.

So what is the clap for, and why does it belong to one place and not the other? The short answer: the clap is a greeting meant for the gods of Shinto, Japan’s native religion, and a temple is not where you greet them. But the clap itself has a stranger history than that.

Not applause

Where most readers grew up, clapping means one thing: you liked what you saw. A concert ends, a speech lands, a friend blows out birthday candles, and you clap.

At a shrine, the clap is something else. It is not praise for anyone’s performance. It is a way of worshipping. Japanese dictionaries simply call it clapping your hands before a god, and it has its own name, kashiwade. Think of it less as applause and more as a greeting, the way a bow is.

It was not always only for gods, either. A Japanese encyclopedia notes that in older times people also clapped at court ceremonies, when gifts were given or received, and at meals. Over time, the clap settled in front of the gods. That encyclopedia even says that worship with a set number of claps, done in a set way, has no real parallel elsewhere in the world.

Even the name is a small puzzle. Kashiwade is written with the character for an oak tree, which differs from the character for “clap” by one small part. One dictionary suggests the oak may have crept in as a copying slip. Other explanations link it to oak leaves, which were once used as plates for food. Nobody is quite sure.

Two claps is a recent standard

The sequence most visitors learn, two bows, two claps, one bow, is often presented as ancient. It is younger than it looks.

The form was fixed for shrine priests in the Meiji era, in the late 1800s. Ordinary visitors came to it later. After the Second World War, the Association of Shinto Shrines, which oversees most shrines in Japan, encouraged everyone to worship this way.

Even then it took time to catch on. Nippon.com notes that at New Year shrine visits around 1990, hardly anyone clapped. Most people simply put their palms together. As an everyday habit for ordinary visitors, the routine you copied in line is surprisingly recent.

And it is not the only way. At Izumo Taisha, one of the oldest and most famous shrines in Japan, the proper form is two bows, four claps, one bow. The shrine explains that at its biggest yearly festival, worshippers clap eight times, eight being a number that stands for something without limit, and on ordinary days they clap half that. Two is the common form, not the only one.

At a temple, hands meet and stay together

A Buddhist temple is a different place. You are not greeting a god of Japan; you are standing before the Buddha, or one of the Buddhist figures who help people toward awakening.

The gesture there is gasshō: palms pressed together in front of the chest, held still. It came to Japan with Buddhism and goes back to an old form of greeting in India, where it is still used today. One traditional explanation is that the right hand stands for the Buddha and the left for ordinary people, so joining them brings the two together. Sensō-ji, the great temple in Tokyo’s Asakusa district, is dedicated to Kannon, a Buddhist figure of compassion. Its advice to visitors is short: put your hands together and call on Kannon by name. Nothing about clapping.

There is no clap, because the gesture is the joining itself. The hands come together quietly and stay.

Many people in Japan move between the two without a second thought. The same family might visit a shrine on New Year’s Day and a temple for a grandparent’s memorial, and their hands simply change. Changing the gesture does not mean changing faith. It is closer to knowing how to behave in each place. It is one reason so many people who say they have no religion still clap at a shrine every New Year.

Back in the line

So when the person in front of you at the shrine bowed twice and clapped twice, they were greeting a god: a gesture that once had a place at court and at the table, and now belongs to the shrine.

At the temple, nobody clapped because nobody was greeting a god of Japan. They were bowing their heads before the Buddha, and there, hands meet and stay together.

Next time you are in that line, you will know which one you are doing. And if you end up at Izumo Taisha, count to four.