The Star Spangled Banner was written during the War of 1812, and wasn't the official national anthem until 1931. Where does it fall in the hsitory of national anthems?
The Swedish national anthem, Du gamla, du fria (Thou ancient, thou free) was written in 1844 and the two versers mentions the north, but not Sweden specifically, probably because Sweden was in a dynastic Union with Norway at the time. The creator of the song, Richard Dybeck, was a Scaninavist and wrote a song he felt could include all of the Nordics (including Sweden-Norwy and Denmark, which also held Iceland and Greenland at the time).
The song started to gain traction as a patriotic song in the 1890s but have never been given an official government-sanctioned approval as a national anthem - while the song is de Facto the Swedish national anthem, it has never been estabsliehd de Jure.
When the King, Oscar II, rose for the song in 1893 it started its march to become the de Facto national anthem, which culiminated when Sveriges Radio, the national radio service started playing it at the end of its daily transmissions.