One of the precursors to our modern day ritual of trick or treating is the custom of sharing soul cakes.
A soul cake is a small round cake (more so a cookie for us in the United States) which is traditionally made for All Hallows’ Eve, All Saints’ Day, and All Souls’ Day to commemorate the dead in the Christian tradition.
Children and the poor would go from door to door, begging for the cakes, in return promising to pray for the homeowner’s relatives, friends, and family whose souls were trapped in Purgatory. According to belief, once the soul had reached enough prayers, it would be released to Heaven.
This practice dates back to the medieval period in Britain and Ireland, continuing in England into the 1930s, by both Protestant and Catholic Christians. The tradition continues in many countries to this day, and similar practices are carried our in other countries like Portugal, where it is called Pão-por-Deus. In many other countries, it is considered the origin of the practice of trick-or-treating.