TALLINN, Estonia — In a sea of embroidered regional costumes and blue, black and white flags, more than 20,000 choral singers recently filled the stage of an amphitheater here, cheering their conductors and composers as if they were rock stars.

The scene was part of the Estonian song and dance celebration, known as Laulupidu, which took place this year from July 4 to 6. The festival was founded in 1869 to resist the forces of Russification. As Estonia fought its way to independence from Russia and the Soviet Union, in 1918 and then again in 1991, choral singing remained a way to preserve the Estonian language and traditions. An unofficial edition of Laulupidu that took place in 1988 in open defiance of Moscow is known as the “Singing Revolution.”

Today, as a member of the European Union, Estonia still clings to national song and dance as a pillar of identity. A recent study by the University of Tartu revealed that, in a country of 1.3 million people, nearly half have at one point participated in Laulupidu. While Russia’s annexation of Crimea from Ukraine still resonates in Estonia, which has its own Russian-speaking minority and a capital city only 218 miles northwest of St. Petersburg, the open-air marathon remains an event of national pride.

The festival, which since 1994 has taken place every five years, this year featured only Estonian composers, all sung in the native language. To compile his chorus each year, the artistic director and conductor, Hirvo Surva, screens choirs across the country. The roughly 1,000 selected groups, who rehearse for as much as two years leading up to the festival, include children’s ensembles and adult groups representing everything from the Estonian Lawyers Association and the Academy of Science to the Grammy-award winning Estonian Philharmonic Chamber Choir. Also joining were more than 1,000 singers, some with Estonian ancestry, hailing from across Europe to North America and Asia. The event is mostly state funded.