The Swedish National Anthem, "Du Gamla, Du Fria," or "Thou Ancient, Thou Free," was written in 1844 by Richard Dybeck, a Scandinavian poet. The poem was then put to music using an old Swedish folk ballad, Karestans dod.
Although "Du Gamla, Du Fria" never officially became Sweden's national anthem, it began to get attention in the late 1800s and started getting used for government ceremonies, sporting events and national holidays. King Oscar II gave the song his approval in 1893 when he rose in respect while it played. A popular Swedish radio show regularly ended with the song, cementing it as the nation's anthem.
Richard Dybeck originally wrote the poem in reference to the three Scandinavian nations while Norway, Sweden and Denmark were briefly joined. However, it seemed to reference Norway and Sweden more than Denmark with norden, which appeared in the song, to specifically reference Sweden. The song vacillated between being considered patriotic and being considered a folk tune for years.
Eventually, other writers added the more patriotic verses three and four that state the individual is willing to fight and die for the country. Verse four even adds the word Sweden to maintain the claim that the song was written for that country.