Take a valley in southern France’s Hautes-Pyrénées region, add a group of friends who’ve known each other since they were kids, and mix in a tradition dating back at least 200 years, and you get the small village of Arreau – where time turns at the speed of a cake on a spit.

Made by pouring layers of batter on a rotating conical-shaped mould over an open fire, the cake on a spit, called le gâteau à la broche in French, is a typical Eastern European recipe. But according to legend, when Napoleon's soldiers were withdrawing from their invasion of Russia in 1812, they brought it back with them to France. There, the recipe had been transmitted orally, with no written record of the original version. Although the cake is considered rare, according to Slow Food, the tradition is alive and well in two French regions: Hautes-Pyrénées and Aveyron.

In Arreau, our welcome was as warm as the fire used to cook the cake. While we walked around the village, stopping from time to time for a glass of wine, Joseph Loste, President of the Confrérie du Gâteau à la Broche (the Brotherhood of the Cake on a Spit), and his childhood friends Paul-J, Lou-Lou, Malou, Christiane and Enrique, took us into the heart of the tradition, telling us about the cake’s history and showing us the secret to making it.

Formed more than 20 years ago, the Brotherhood is not only a way to keep the recipe and the tradition alive, but it also nourishes friendships that trace back at least 50 years.

According Loste, as kids, he and his friends had a crucial role in making the cake. During holidays or after school, while their parents were at work, they would help their grandparents prepare the dessert for big family reunions, putting the fresh dough on the spit and turning it in front of the fireplace. When pieces of dough fell into a big cooking pot placed below, the children would be rewarded for their work in the form of hot, half-cooked sweet dough.

Today, this group of friends still enjoys making the cake, and all the nostalgia that goes with it.

The day after visiting Arreau, we all woke up at 6am to go to Morlaàs, some 90km to the west, where the Salon du Vin et de la Gastronomie, a traditional food and wine fair, was taking place. There, Loste and the rest of the Brotherhood demonstrated how to make the cake, which takes five hours to complete.

Throughout the day, they alternated slowly pouring layers of dough on the mould and turning the spit. As the cake cooked, the centrifugal force of the spinning motion caused the dough to spread from the centre of the mould, creating a peak that resembled a stalagmite with rocky protrusions.

People gathered, drawn in by the smell of the cake cooking – particularly the rum – and waited to get a taste of the finished cake, which had turned an inviting sunny-yellow colour. After the cake was placed on a table to be sliced, Enrique, a spirited 60-year-old, took Malou’s hand, and they danced together in front of the fireplace to celebrate the end of an amazing day.

Gâteau à la broche (cake on a spit) (serves 120 people) Ingredients:

120 eggs

3kg sugar

3kg flour

3kg butter

2 litres rum

2 cups Ricard While the fire is being prepared, mix the egg yolks with half the sugar. Add the rum and Ricard, and then fold in the flour. Stir in the melted butter. Separately, beat the egg whites, adding the remaining sugar once soft peaks form. Continue beating until they look like ‘snow’, and then combine with the yolk-sugar mixture until a deep yellow dough is formed. Cover the big, conical-shaped wooden mould with baking paper and place it on a spit in front of the fire, turning it constantly. After about an hour, begin gently pouring the dough on it. Continue adding the dough and turning the spit for about five hours.

Culinary Roots is a series from BBC Travel connecting to the rare and local foods woven into a place’s heritage.

Join over three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.