Modern period
Several movements whose goals were the establishment of an autonomous Macedonia, which would encompass the entire region of Macedonia, began to arise in the late 19th century; the earliest of these was the Bulgarian Macedonian-Adrianople Revolutionary Committees, later becoming Secret Macedonian-Adrianople Revolutionary Organization (SMARO). In 1905 it was renamed the Internal Macedonian-Adrianople Revolutionary Organization (IMARO), and after World War I the organisation separated into the Internal Macedonian Revolutionary Organization (IMRO) and the Internal Thracian Revolutionary Organisation (ITRO).
In the early years of the organisation, membership eligibility was exclusive to Bulgarians, but later it was extended to all inhabitants of European Turkey regardless of ethnicity or religion. The majority of its members were Macedonian Bulgarians. In 1903, IMRO organised the Ilinden–Preobrazhenie Uprising against the Ottomans, which after some initial successes, including the forming of the Kruševo Republic, was crushed with much loss of life. The uprising and the forming of the Kruševo Republic are considered the cornerstone and precursors to the eventual establishment of the Macedonian state. The leaders of the Ilinden uprising are celebrated as national heroes in North Macedonia. The names of IMRO revolutionaries like Gotse Delchev, Pitu Guli, Dame Gruev and Yane Sandanski were included into the lyrics of the national anthem of the state of North Macedonia "Denes nad Makedonija" ("Today over Macedonia"). The major national holiday of North Macedonia, the Republic Day, is celebrated on 2 August, Ilinden (St. Elijah day), the day of the Ilinden uprising.
Following the two Balkan Wars of 1912 and 1913 and the dissolution of the Ottoman Empire, most of its European-held territories were divided between Greece, Bulgaria and Serbia. Most of the territory that was to become North Macedonia was annexed by Serbia conforming to the treaty of peace concluded at Bucharest. However, Strumica region was passed to Bulgaria. Following the partition, an anti-Bulgarian campaign was carried out in the areas under Serbian and Greek control. As many as 641 Bulgarian schools and 761 churches were closed by the Serbs, while Exarchist clergy and teachers were expelled. The use of all Macedonian dialects and standard Bulgarian were proscribed. IMRO, together with local Albanians, organised the Ohrid–Debar uprising against the Serbian rule. Within a few days the rebels captured the towns of Gostivar, Struga and Ohrid, expelling the Serbian troops. According to the Carnegie Endowment for International Peace report, a Serbian army of 100,000 regulars suppressed the uprising. Many were killed and tens of thousands of refugees fled to Bulgaria and Albania.
During the First World War, most of today's North Macedonia was part of the Bulgarian occupied zone of Serbia after the country was invaded by the Central Powers in the fall of 1915. The region was known as the "Military Inspection Area of Macedonia" and was administered by a Bulgarian military commander. A policy of Bulgarisation of the region and its population was immediately initiated, during the period the IMRO arose from a clandestine organisation to serve as gendarmerie, taking control of the whole police structure, enforcing the Bulgarisation of the region. According to Robert Gerwarth, the Bulgarian denationalisation policy, including its paramilitary aspect, was almost identical in its intent and execution to the Serbian policy that preceded it.
Bulgarian language was to be exclusively used, Serbian Cyrillic was forbidden, Serbian priests were arrested and deported, Serbian-sounding names had to be changed to Bulgarian ones, school teachers were brought from Bulgaria while Serbian books were taken from schools and libraries and publicly destroyed. Adult males were sent to labour camps or forced to join the Bulgarian Army, representatives of the Serbian intelligentsia were deported or executed. According to Paul Mojzes the aim of the Bulgarian government was to create pure Bulgarian territories by denationalising the non-Bulgarian Slavic population of Macedonia.
After the capitulation of Bulgaria and the end of the First World War, the area returned under Belgrade control as part of the newly formed Kingdom of Serbs, Croats and Slovenes and saw a reintroduction of anti-Bulgarian measures. Bulgarian teachers and clergy were expelled, Bulgarian language signs and books removed, and all Bulgarian organisations dissolved. Also after the Treaty of Neuilly-sur-Seine, the Strumica region was annexed to Serbian Macedonia in 1919.
The Serbian government pursued a policy of forced Serbianisation in the region, which included systematic suppression of Bulgarian activists, altering family surnames, internal colonisation, exploiting workers, and intense propaganda. To aid the implementation of this policy, some 50,000 Serbian army and gendarmerie were stationed in present-day North Macedonia. By 1940 about 280 Serbian colonies (comprising 4,200 families) were established as part of the government's internal colonisation program (initial plans envisaged 50,000 families settling in present-day North Macedonia).
In 1929, the Kingdom was officially renamed the Kingdom of Yugoslavia, and divided into provinces called banovinas. South Serbia, including all of present-day North Macedonia, became the Vardar Banovina of the Kingdom of Yugoslavia.
The Internal Macedonian Revolutionary Organization (IMRO) promoted the concept of an Independent Macedonia in the interwar period. Its leaders—including Todor Alexandrov, Aleksandar Protogerov, and Ivan Mihailov—promoted independence of the Macedonian territory split between Serbia and Greece for the whole population, regardless of religion and ethnicity. The Bulgarian government of Alexander Malinov in 1918 offered to give Pirin Macedonia for that purpose after World War I, but the Great Powers did not adopt this idea because Serbia and Greece opposed it. In 1924, the Communist International (Comintern) suggested that all Balkan communist parties adopt a platform of a "United Macedonia" but the suggestion was rejected by the Bulgarian and Greek communists.
IMRO followed by starting an insurgent war in Vardar Macedonia, together with Macedonian Youth Secret Revolutionary Organization, which also conducted guerrilla attacks against the Serbian administrative and army officials there. In 1923 in Stip, a paramilitary organisation called Association against Bulgarian Bandits was formed by Serbian chetniks, IMRO renegades and Macedonian Federative Organization (MFO) members to oppose IMRO and MMTRO. On 9 October 1934, IMRO member Vlado Chernozemski assassinated Alexander I of Yugoslavia.
The Macedonist ideas increased in Yugoslav Vardar Macedonia and among the left diaspora in Bulgaria during the interwar period. They were supported by the Comintern. In 1934, the Comintern issued a special resolution in which for the first time directions were provided for recognising the existence of a separate Macedonian nation and Macedonian language.
During World War II, Yugoslavia was occupied by the Axis powers from 1941 to 1945. The Vardar Banovina was divided between Bulgaria and Italian-occupied Albania. Bulgarian Action Committees were established to prepare the region for the new Bulgarian administration and army. The committees were mostly formed by former members of IMRO and Macedonian Youth Secret Revolutionary Organization (MYSRO, but some IMRO (United) former members also participated.
As leader of the Vardar Macedonian communists, Metodi Shatorov ("Sharlo") switched from the Yugoslav Communist Party to the Bulgarian Communist Party and refused to start military action against the Bulgarian Army. The Bulgarian authorities, under German pressure, were responsible for the round-up and deportation of over 7,000 Jews in Skopje and Bitola. Harsh rule by the occupying forces encouraged many Vardar Macedonians to support the Communist Partisan resistance movement of Josip Broz Tito after 1943, and the National Liberation War ensued.
In Vardar Macedonia, after the Bulgarian coup d'état of 1944, the Bulgarian troops, surrounded by German forces, fought their way back to the old borders of Bulgaria. Under the leadership of the new Bulgarian pro-Soviet government, four armies, 455,000 strong in total, were mobilised and reorganised. Most of them re-entered occupied Yugoslavia in early October 1944 and moved from Sofia to Niš, Skopje and Pristina with the strategic task of blocking the German forces withdrawing from Greece. The Bulgarian army would reach the Alps in Austria, participating in the expulsion of the Germans to the west, through Yugoslavia and Hungary.
Compelled by the Soviet Union with a view towards the creation of a large South Slav Federation, in 1946 the new Communist government, led by Georgi Dimitrov, agreed to give Bulgarian Macedonia to a United Macedonia. With the Bled agreement, in 1947 Bulgaria formally confirmed the envisioned unification of the Macedonian region, but postponed this act until after the formation of the future Federation. It was the first time it accepted the existence of a separate Macedonian ethnicity and language. After the Tito–Stalin split the region of Pirin Macedonia remained part of Bulgaria and later the Bulgarian Communist Party revised its view of the existence of a separate Macedonian nation and language.
In December 1944, the Anti-fascist Assembly for the National Liberation of Macedonia (ASNOM) proclaimed the People's Republic of Macedonia as part of the People's Federal Republic of Yugoslavia. ASNOM remained an acting government until the end of the war. The Macedonian alphabet was codified by linguists of ASNOM, who based their alphabet on the phonetic alphabet of Vuk Stefanović Karadžić and the principles of Krste Petkov Misirkov. During the civil war in Greece (1946–1949), Macedonian communist insurgents supported the Greek communists. Many refugees fled to the Socialist Republic of Macedonia from there. The state removed "Socialist" from its name in 1991 when it peacefully seceded from Yugoslavia.
The new republic became one of the six republics of the Yugoslav federation. Following the federation's renaming as the Socialist Federal Republic of Yugoslavia in 1963, the People's Republic of Macedonia was likewise renamed the Socialist Republic of Macedonia.
North Macedonia officially celebrates 8 September 1991 as Independence day (Macedonian: Ден на независноста, Den na nezavisnosta), with regard to the referendum endorsing independence from Yugoslavia. The anniversary of the start of the Ilinden Uprising (St. Elijah's Day) on 2 August is also widely celebrated on an official level as the Day of the Republic.
Robert Badinter, as the head of the Arbitration Commission of the Peace Conference on Yugoslavia, recommended EC recognition in January 1992. On 15 January 1992, Bulgaria was the first country to recognise the independence of the republic.
Macedonia remained at peace through the Yugoslav Wars of the early 1990s. A few very minor changes to its border with Yugoslavia were agreed upon to resolve problems with the demarcation line between the two countries. It was seriously destabilised by the Kosovo War in 1999, when an estimated 360,000 ethnic Albanian refugees from Kosovo took refuge in the country. They departed shortly after the war, and Albanian nationalists on both sides of the border took up arms soon after in pursuit of autonomy or independence for the Albanian-populated areas of Macedonia.