At some point during the marriage ceremony (the exact point varies between different traditions, but usually during the end), a glass wrapped in cloth is placed on the ground under the chuppah, or bridal canopy. One member of the couple stomps on it, and the congregation shouts "mazal tov!" in congratulations.

The tradition dates back to at least the fourth century CE.

The oldest reference to breaking glass during a wedding in Jewish literature is in the Talmud, an important Jewish legal text. In an esoteric discussion among rabbis about happiness and solemnity during prayer, there's a story of a rabbi who hosts a wedding for his son.

During the wedding, he sees the attending rabbis are excessively joyous, so he gets an expensive cup, breaks it in front of them, and they become sad.

It's a cryptic story. Why make the wedding guests sad? One explanation offered in the Talmud is to make sure they don't get too carried away in their merriment and end up sinning.

The more generally understood reason is that it all refers to a verse from Psalm 137, often recited before breaking the glass, which values keeping "Jerusalem in memory even at the happiest hour."

The memory isn't a happy one.

Two of the most important events in Jewish history are the destructions of the first and second temples in Jerusalem.

In Judaism, the temple is supposed to be the physical focal point of faith and worship. The first one was destroyed by the Neo-Babylonian king Nebuchadnezzar II. It was replaced by a second temple at around 530 BCE, while Jerusalem was occupied by the Persian Empire, and then destroyed in 70 CE by the Roman army. Now, the only accessible remains are a small section of its outer western wall.

Jerusalem's Western Wall, one of the few remaining parts of the Second Temple. Shutterstock

Breaking the glass is supposed to recall the destruction of the temples. It's a way of remembering the tragedy of Jerusalem "even at the happiest hour" — that is to say, your wedding.

In that context, breaking the glass resembles the passage in Exodus when Moses comes down from Mount Sinai and, seeing the Jewish people worshiping the Golden Calf, broke the first set of tablets God gave him.

"Since the giving of the Torah to the Jewish people was the marriage between God and the Jewish people, the breaking of the glass recalls this first-ever tragedy that occurred to our people at Mount Sinai," Hajioff writes.

For some Jews, breaking glass was used to keep demons away.

In Eastern Europe, the idea of demons associated with different sins became popular in Jewish life. People were thought to be particularly susceptible to demonic possession and curses during rites of passage, like circumcision ceremonies and weddings.

Shattering glass, some scholars suggest, would keep demons away. It would frighten them with a loud noise, or otherwise confuse them into thinking it was an event of mourning, not of celebration.

A couple breaking the glass together. AP Photo/Kevork Djansezian

Glass itself is deeply symbolic.

Anything that's fragile could be shattered, so why glass?

Hajioff writes that glass is shattered rather than, say, ceramic or fine china because it can be remelted and reblown.

"Similarly, we humans can have moments where we are 'broken' or even 'shattered,'" Hajioff writes. "Like glass we can reform as new beings if need be. So we break glass because it recalls our mortality but also the divine promise of immortality of the soul."

The reason, he said, is because many Jews are unaware of the reasoning behind breaking the glass — to remember the destruction of the temples — and therefore treat the moment with levity instead of sorrow.

Nowadays, Psalms 137 is often recited before breaking the glass to remind everyone about where the tradition comes from. During the happiest day in a couple's life, it's a moment to remember the weight of history that brought them there in the first place.