Els Segadors, the national anthem of Catalunya, has its origins in a traditional Catalan song of the XVII century. It emerges from the war between the Catalans, commanded by Pau Claris the President of the Generalitat, against the king Felip IV and the Count Duque d'Olivares.
In 1892 the musician Francesc Alió with the help of the entity "La Jove Catalunya" composed the anthem from the melody of a traditional tavern song and the lyrics of "Els Segadors". At the end of each line he added the sentence "Bon cop de falç!" (a good blow with a sickle) The song became more famous and you could often hear it at Catalan demonstrations but the lyrics were really too long.
In 1899 the "Unió Catalinista" convened a contest to decide upon a less extensive set of lyrics. The winner was the poet Emili Guanyavents.
During the dictatorship of Primo de Rivera (1923-1930), "Els Segadors" was absolutely forbidden but in reality the Catalans substituted it for other traditional songs.
In 1931 after the dictatorship "Els Segadors" was consecrated as the national anthem of Catalunya.
During the dictatorship of Franco (1939-1975) Catalan culture, the Catalan national anthem and the Catalan language were all forbidden again.
It wasn't till the end of the dictatorship in 1975 that Catalunya recovered its culture, its language and its national anthem.