Image copyright AFP

Latvia's most important national holiday is arguably not Christmas but the summer solstice celebrations of Ligo (pronounced "leegwa") - a pagan tradition when Latvians celebrate the shortest night by staying up to greet the rising sun.

As the sun slowly sets about an hour and a half before midnight, it peeks out briefly from behind the clouds.

We all run out excitedly. Five minutes later, it is gone. For a festival which is all about celebrating the sun, the sun itself is being remarkably coy.

The weather has been poor all day but this is a beautiful, if fleeting, moment.

In this far northern land, winters are long, dark and snowy, with the temperature regularly falling below -30C, so you can understand why the arrival of the long summer days is greeted by something approaching national hysteria.

It is widely thought that Latvia enjoys a mini baby-boom every year, about nine months after Ligo

It is not a complicated festival. All you have to do is head out to the countryside, get a fire going, stay up all night waiting for the sun to come up and drink lots and lots of beer - which, I can only assume, is why it is called Ligo, the Latvian word for "sway".

Women pick flowers to make into crowns for their heads, while men are supposed to strip naked and jump into a nearby lake or river.

Everyone sings medieval Latvian songs around the fire and couples are encouraged to disappear into the forest to look for a mythical flowering fern.

As a result of this particular tradition, it is widely thought that Latvia enjoys a mini baby-boom every year, about nine months after Ligo - no doubt all the drinking also has something to do with it.

Image copyright AFP

The songs, the flowers, the running around naked are all signs of the pagan roots which Latvians are proud of and which have made the country what it is today.

Over the centuries, this tiny nation has been invaded by Swedes, Russians, Germans (with the Russians and the Germans even coming back for a second go) and ancient traditions helped Latvians hang on to their sense of national identity, even in the darkest days of foreign occupation.

During the years of Soviet rule, Latvian songs and poems were an important part of the resistance movement, eventually culminating in the so-called Singing Revolution in the late 1980s.

People here showed their desire for independence from the Soviet Union through mass singing events. The songs galvanised the independence movement by reminding Latvians of their pre-Soviet identity.

The midsummer celebrations are also a symbol of a romanticised and - in some ways quite fictional - rural past, and they are a reminder of a time before Stalin destroyed the Latvian countryside by sending small landowners to the gulags.

Midsummer was the point when farmers had finished ploughing and sowing the crops, and had not yet started the harvest. A good time to have a party.

Today in a globalised world of lattes and wi-fi, such ancient traditions seem to be more important than ever.

Zara and Costa Coffee may have arrived in Riga, but it is also more common than ever to see people walking round the streets in medieval national costume on public holidays.

Image copyright AFP Image caption Wearing oak-leaf wreaths is a traditional element of the festival

High-quality Latvian-made designs are seen as more fashionable than anything H & M might have to offer.

But the traditions are also constantly in flux. My Latvian friends could not quite agree whether the Ligo tradition of jumping over the bonfire guaranteed you wealth, luck or love. To be on the safe side, we all did it anyway.

And there seemed to be a bit of controversy over whether the flowers in the girls' hair meant they were virgins or just looking for love. As all the women had flowers on their heads, including a pregnant friend of mine, I can only assume that the general understanding was the latter.

The missionaries obviously hoped that the Balts would soon forget their pagan, nature-worshipping ways

Because this is the night when evil spirits are about, traditionally Latvians would protect their livestock by decorating them with wreaths made from branches and leaves.

Modern Latvians have more wealth invested in their cars than their cows, so today bumpers and wing mirrors are adorned with greenery instead.

And even the date is a little bit confused. The actual summer solstice is a few days before Ligo. It is thought it was moved after Christianity arrived in the Baltics in the 12th Century, to coincide with St John the Baptist's feast day.

The missionaries obviously hoped that the Balts would soon forget their pagan, nature-worshipping ways - instead they kept doing the same thing, just a few days later.

The advantage of this rather loose definition of tradition is that it can be easily adapted.

At this particular Ligo celebration, there was a large group of French visitors so, as the Latvian sun came up, it was greeted by a long, wobbly line of people who had certainly done their bit with the Latvian beer but had dropped the traditional Latvian songs, in favour of a rather chaotic French cancan.

How to listen to From Our Own Correspondent:

BBC Radio 4: A 30-minute programme on Saturdays, 11:30 BST.

Second 30-minute programme on Thursdays, 11:00 BST (some weeks only).

Listen online or download the podcast

BBC World Service:

Hear daily 10-minute editions Monday to Friday, repeated through the day, also available to listen online.

Read more or explore the archive at the programme website.