The 19th century saw the rise of the Slovak National Revival, a movement to define and defend Slovak culture and language against the official policy of Magyarization within the Kingdom of Hungary. Intellectuals, writers, and priests worked to establish a distinct national consciousness.
A pivotal moment came in 1843 when Ľudovít Štúr and his followers codified a new standard for the written Slovak language based on central Slovak dialects. This version quickly gained widespread acceptance and became a powerful tool for unifying the nation and for political expression, especially during the Revolutions of 1848.
As Austria-Hungary neared collapse in World War I, the idea of a common state with the Czechs became a viable political goal. The effort was led from abroad by Tomáš G. Masaryk, Edvard Beneš, and the Slovak general and diplomat Milan Rastislav Štefánik, who organized the Czechoslovak Legions and secured Allied support.
Czechoslovakia was proclaimed in Prague on October 28, 1918. Two days later, on October 30, Slovak political leaders signed the Martin Declaration, formally severing ties with Hungary and joining the new republic. The borders of the new state were officially established by the Treaty of Trianon in 1920.