Since the Middle Ages a tradition of mumming on a certain holiday has existed in parts of Britain and Ireland. It involved going door-to-door in costume in exchange for food or drink. The custom of trick-or-treating on Halloween may come from the belief that supernatural beings, or the souls of the dead, roamed the earth at this time and needed to be appeased.
It may otherwise have originated in a Celtic festival, Samhain, held on 31 October–1 November, to mark the beginning of winter, in Ireland, Scotland, and the Isle of Man, and Calan Gaeaf in Wales, Cornwall, and Brittany. The festival is believed to have pre-Christian roots. In the 9th century, the Catholic Church made 1 November All Saints' Day. Among Celtic-speaking people, it was seen as a liminal time, when the spirits or fairies (the Aos Si), and the souls of the dead, came into our world and were appeased with offerings of food and drink.