Tomorrow, people all throughout the United States, Ireland, and Scotland will celebrate Halloween. Children will dress up in costumes and go door-to-door asking for candy, adults will dress up and go to parties, and, if you are in Ireland, where Halloween is a national holiday, fireworks will be launched. But where does this holiday and its traditions come from?

The origins of Halloween typically are associated with the ancient Gaelic harvest festival Samhain (pronounced SOW-win). For the Gaelic people, late fall and early winter was considered a liminal time of year in which the fairies from the Otherworld could cross into this world. To protect their crops, livestock, and possessions, the Gaels would leave offerings for these spirits. It was also believed that the souls of the dead would come an visit the homes of their relatives. However, all this may also be speculation, as some academics argue that we in the modern era actually know very little about how Gaelics, and Celtic people in general, celebrated their harvest festivals.

Halloween is a contraction of All Hallow’s Eve, the evening before All Hallows Day or All Saints Day. All Hallows Day is thought to have begun as a tradition when Pope Gregory III founded an oratory in Old St. Peter’s Basilica for the relics of holy apostles and all saints, martyrs and confessors. In 835 A.D., Pope Gregory IV fixed the date of All Hallow’s Day to November 1, which was the same date as Samhain. This also was the same time in which some Germanic pagan festivals would be celebrated. While this suggests that Gregory IV was substituting a pagan holiday (or multiple pagan holidays) with a Christian one, some academics think that the association of Halloween’s origins to Samhain might be overstated, or even non-existent. For instance, there is speculation that because Rome had problems with over-crowding and disease during the summer months due to a high volume of tourism and pilgrimages during that time, a date late in the year was picked to help ease those problems

All Hallow’s Eve is part of a three-day period of Christian ritual known as Allhallowtide, comprised of All Hallow’s Eve, All Hallow’s Day, and All Souls Day, and is part of a tradition of remembrance of the dead, particularly of martyrs, that goes back to at least the 4th century. By the late 12th century in the High Middle Ages, the idea of purgatory, an intermediate spirit world between heaven and hell, had developed, and Allhallowtide became a time when Christian faithful were required by the Catholic Church to attend Mass. Bells would be rung for the souls in purgatory, and criers dressed in black would walk the streets, ringing bells and requesting that people pray for the souls of the deceased. A few hundred years later, probably by the 15th century, a custom called “souling” emerged where the faithful would bake breads and pastries to share with all christened (baptized) souls. Groups of poor people, particularly children, would go door-to-door collecting these “soul cakes” in exchange for praying for the dead. It is thought that this is also when the idea of wearing costumes emerged, either to protect oneself from vengeful spirits who wandered on All Hallow’s Eve one last time before entering purgatory, or to allow the congregations of poor churches dress up as saints since their churches could not afford to acquire and display holy relics.

Other customs also emerged during the High and Late Middle Ages regarding the Halloween festival. Fires were lit to guide the souls of the deceased to their eternal resting place instead of haunting an area, while other homes lit candles to that the spirits of deceased relatives could visit their living ones. In mainland Europe, particularly France, many believed in a danse macabre, that souls on Halloween would arise from their graves and dance together in a carnival. During this time, people might see Jesus as an infant, patron saints, or the pietá – Virgin Mary holding the deceased body of Jesus.

With the Protestant Reformation, many of these traditional religious rituals underwent many changes. In England, some Protestants, particularly Calvinists, rejected the concept of purgatory, believing that the dead were predestined either to heaven or hell. Thus, the spirits that wandered during Halloween could not be those of the dead, but of demons, and so rituals involving prayers for the dead should be abolished. However, other Protestants believed that there is an intermediate state between heaven and hell, which they called Hades or the Bosom of Abraham, and these Protestants continued many of the traditional customs such as souling, bell ringing, and candle-lit processions. Those who believed that the spirits haunting the land during this time were in fact demons would light fires and gather together in prayer in an attempt to ward them off.

After the Guy Fawkes gunpowder plot on November 5, 1605, Halloween celebrations in England became replaced by Guy Fawkes day, celebrated every November 5. The failed plot was seen as a polish (Catholic) attempt to subvert the Protestant order, and since Halloween is historically a Catholic holiday, it lost its popularity. However, in Scotland, Halloween was seen an important celebration of the human life cycle and a time for communities to be bound together, and so the Presbyterian Calvinist government their tolerated it. The holiday also continued to be celebrated in Ireland, where remnants of the ancient Samhain were also celebrated.

During the 19th century in Ireland and also throughout Britain, various divination rituals began to develop based on traditional harvest rituals. Activities such as apple-bobbing, nut roasting, scrying, dream interpretation, and other mystical activities were practiced. Bonfires burned to protect homes once again. In Scotland, some churches banned these practices, or else allowed people to burn fire to ward of the devil.

Since Guy Fawkes replaced Halloween just as England began colonizing the Americas, the holiday was not very popular in the American Colonies, which eventually became the United States, and was known primarily as simply a day on the liturgical calendar. It wasn’t until the Irish and Scottish immigration in the mid-19th century, when those peoples brought over their traditions, that Halloween became the popular holiday in the United States that it is today.