Until the breakup of Czechoslovakia at the end of 1992, the Slovak anthem was used as part of the Czechoslovak anthem. The melody of the anthem, long used as an unofficial anthem, is that of a Slovak folk song entitled “Kopala studienku”. The lyrics were written by a Slovak student who was one of those who joined other students in an exodus from Bratislava to Levoča in 1843 in protest over the firing of a teacher who had Slovak nationalist views; the Tatras, mentioned in the first verse, are a mountain range the students would have passed through on their way from Bratislava to eastern Slovakia, and have been used as a symbol of the nation as a whole.

The song quickly became popular with Slovaks, especially the other students involved in the protest and was used as the Slovak anthem when Czechoslovakia was created. Upon restoration of Slovak independence in 1993, the anthem was made the anthem of Slovakia, slightly altering the version in use until then by replacing the phrase “Zastavme sa” (“Let us pause”), which was a common variant to that point, with “Zastavme ich” (“Let us stop them”), which was determined to be the original words in Matúška’s poem.