The ancient Scots had no idea that Little Rae’s Bakery would transform their simple shortbread recipe into the now famous, colorful, and buttery delicious cookies we make today. As with most recipes, they change with the whims of a chef’s creativity, often forced into necessity by the limitations of available ingredients. Now, this simple cookie can seek fame and fortune through the glamor of our Instagram feed and show the history of the shortbread cookie in an unfinished story that began long ago.

In simple terms, shortbread is a type of cookie classified by its high butter content. It is named shortbread due to its short, or crumbly, structure—which is caused by the high proportion of fat. The traditional recipe, developed in Scotland, consists of one part sugar, two parts butter, and three parts flour. Of course, there are many variations on that, with some bakers using a 1:1:1 ratio and others who subsequently added other ingredients. But all modern-day butter cookies are derived from this simple 1-2-3 recipe.

Some experts believe shortbread can be traced back to the 12th century. Legend has it that Scottish chefs baked shortbread in the winter months and put slits into the rounds to resemble the sun’s rays. This yearly ritual was performed in an effort to persuade the sun to return and put an end to the cold winter.

However, the crumbly, buttery treat is most often associated with the mid-16th century Mary, Queen of Scots. She was known for her love of Petticoat Tails, a crunchy, thin, shortbread that was speckled with caraway seeds.

If we look even further back, that traditional shortbread recipe was actually a result of the medieval times’ “biscuit bread,” which consisted of hard, dry, and sweet biscuits (also known as rusks) made from enriched (yeasted) dough. The rusks were twice baked and dusted with sugar and spices. Once butter became more available, it eventually replaced the yeast, morphing into the shortbread we know today. In Commonwealth countries, cookies are still referred to as biscuits.

According to Historic UK, shortbread used to be considered a luxury. Because it was so expensive to make, common folk reserved it for special occasions such as weddings and holidays.

“In Shetland it was traditional to break a decorated shortbread cake over the head of a new bride on the threshold of her new home,” Historic UK contributor Ben Johnson writes. “The custom of eating shortbread at New Year has its origins in the ancient pagan Yule Cakes which symbolized the sun. In Scotland it is still traditionally offered to ‘first footers’ at New Year.”

Fortunately, due to the agricultural revolution, shortbread is now available to the masses at an affordable price. Click here to find a café or store near you that sells Little Rae’s shortbread cookies.