Each December, cooks around the country take to their kitchens to bake cookies galore. Whether you prefer gingerbread men, crisp springerle or crunchy biscotti, chances are you’ll enjoy some fresh baked Christmas cookies this holiday season. Like many Christmas traditions, the origin of this delicious custom lies ages ago, in solstice rituals conducted long before Christmas became the huge commercial holiday it is today.

Winter solstice festivals have been held for eons, across the world. From Norway to West Africa, Ireland to India, groups of people gathered to celebrate the changing of the seasons. Celebrations revolved around food; after all, you had to feast before the famine of the winter.

Solstice often meant the arrival of the first frost, so animals could be killed and kept safely to eat through the winter, and fermented beverages like beer and wine that had been brewed in the spring were finally ready to drink. As any modern host knows, a hearty roast and a stiff drink need just one thing to complete the party: dessert.

By the Middle Ages, the Christmas holiday had overtaken solstice rituals throughout much of present-day Europe. However, the old feast traditions remained. And while the roast and drink recipes were probably quite similar to what earlier Europeans had enjoyed, the pastry world was experiencing some amazing changes. Spices like nutmeg, cinnamon and black pepper were just starting to be widely used, and dried exotic fruits like citron, apricots and dates added sweetness and texture to the dessert tray.

These items, along with ingredients like sugar, lard and butter, would have been prized as expensive delicacies by medieval cooks. Only on the most important holiday could families afford treats like these, which led to a baking bonanza to prepare for Christmas. And unlike pies or cakes, cookies could be easily shared and given to friends and neighbors. Our modern Christmas cookies date back to these medieval gifts.

Though cookies have come a long way since medieval times, some things haven’t changed. Many Christmas cookies are still heavily spiced. We think of “traditional” Christmas flavors like cinnamon, nutmeg and ginger, and those are exactly the same spices medieval cooks would have used in their cookies ages ago. 

Gingerbread is a classic Christmas cookie, and yet it’s also a cookie that would have tasted strikingly similar back in the Middle Ages. Ginger, cinnamon, nutmeg and mace combine to make a snappy, spicy taste, just like they would have back then. And gingerbread uses molasses as a sweetener, something that medieval cooks would appreciate as refined sugar was so expensive. These cooks would not have made gingerbread men, however. The first person to try that was none other than Queen Elizabeth I of England, who had the cookie molded into the shapes of her favorite courtiers.