Early version of the "Wilhelmus" as preserved in a manuscript of 1617 (Brussels, Royal Library
, MS 15662, fol. 37v-38r)
The custom of an officially adopted national anthem became popular in the 19th century.
They are often disambiguation needed] that may have been in existence long before their designation as national anthem. The national anthem of the Netherlands, "Wilhelmus", adopted as national anthem in 1932, originates in the 16th century: It was written between 1568 and 1572 during the Dutch Revolt and its current melody variant was composed shortly before 1626, and was a popular orangist march during the 17th century. The Japanese national anthem, "Kimigayo" (adopted 1999), was composed in 1880, but its lyrics are taken from a Heian period (794–1185) poem.
In the early modern period, some European monarchies adopted royal anthems. Some of these anthems have survived into current use. "God Save the King/Queen", first performed in 1619, remains the royal anthem of the United Kingdom and the Commonwealth realms. La Marcha Real, adopted as the royal anthem of the Spanish monarchy in 1770, was adopted as the national anthem of Spain in 1939. Denmark retains its royal anthem, Kong Christian stod ved højen mast (1780) alongside its national anthem (Der er et yndigt land, adopted 1835). In 1802, Gia Long commissioned a royal anthem in the European fashion for the Kingdom of Vietnam.
The first national anthem to be officially adopted was La Marseillaise, for the First French Republic. Composed in 1792, it was officially adopted by the French National Convention in 1795. It was retired in favour of Chant du départ under the First French Empire, and was re-instated in 1830, in the wake of the July Revolution. From this time, it became common for newly formed nations to define national anthems, notably as a result of the Latin American wars of independence, for Argentina (1813), Peru (1821), Brazil (1831) but also Belgium (1830).
Adoption of national anthems prior to the 1930s was mostly by newly formed or newly independent states, such as the First Portuguese Republic (A Portuguesa, 1911), the Kingdom of Greece ("Hymn to Liberty", 1865), the First Philippine Republic (Marcha Nacional Filipina, 1898), Lithuania (Tautiška giesmė, 1919), Weimar Germany (Deutschlandlied, 1922), Republic of Ireland (Amhrán na bhFiann, 1926) or Greater Lebanon ("Lebanese National Anthem", 1927).
The Olympic Charter of 1920 introduced the ritual of playing the national anthems of the gold medal winners. From this time, the playing of national anthems became increasingly popular at international sporting events, creating an incentive for such nations that did not yet have an officially defined national anthem to introduce one.
The United States introduced the patriotic song The Star-Spangled Banner as national anthem in 1931. Following this, several nations moved to adopt as official national anthem patriotic songs that had already been in de facto use at official functions, such as Mexico (Mexicanos, al grito de guerra, composed 1854, adopted 1943), Switzerland ("Swiss Psalm", composed 1841, de facto use from 1961, adopted 1981).
By the period of decolonisation in the 1960s, it had become common practice for newly independent nations to adopt an official national anthem. Some of these anthems were specifically commissioned, such as the anthem of Kenya, Ee Mungu Nguvu Yetu, produced by a dedicated "Kenyan Anthem Commission" in 1963.
A number of nations remain without official national anthem. In these cases, there are established de facto anthems played at sporting events or diplomatic receptions. These include the United Kingdom ("God Save the Queen"), Sweden (Du gamla, Du fria) and Norway (Ja, vi elsker dette landet). Countries that have moved to officially adopt their long-standing de facto anthems since the 1990s include: Luxembourg (Ons Heemecht, adopted 1993), South Africa ("National anthem of South Africa", adopted 1997), Israel (Hatikvah, composed 1888, de facto use from 1948, adopted 2004), Italy (Il Canto degli Italiani, adopted 2017).