The history of North Macedonia encompasses the history of the territory of the modern state of North Macedonia.

Prehistory

The Vinča culture was an early culture of Southeastern Europe (between the 6th and the 3rd millennium BC), stretching around the course of the Danube in Serbia, Croatia, northern parts of Bosnia and Herzegovina and Montenegro, Romania, Bulgaria, and the Republic of North Macedonia, although traces of it can be found all around the Southeastern Europe, parts of Central Europe and in Asia Minor.

Ancient period

Paeonians and other tribes

In antiquity, most of the territory that is now North Macedonia was included in the kingdom of Paeonia, which was populated by the Paeonians, a people of Thracian origins.Bauer, Susan Wise: The History of the Ancient World: From the Earliest Accounts to the Fall of Rome (2007), , page 518: "... Italy; to the north, Thracian tribes known collectively as the Paeonians." It also corresponds to parts of ancient IllyriaWilkes, John: The Illyrians, Wiley-Blackwell, 1996, , p. 49.Sealey, Raphael, A history of the Greek city states, ca. 700-338 B.C., p. 442. University of California Press, 1976. . and Dardania,Evans, Thammy, Macedonia, Bradt Travel Guides, 2007, p. 13 inhabited by various Illyrian peoples.Borza, Eugene N., In the shadow of Olympus: the emergence of Macedon, Princeton University Press, 1992, , pp. 74-75.Lewis, D.M. et al. (ed.), The Cambridge ancient history: The fourth century B.C., Cambridge University Press, 2000, , pp. 723-724. Most of modern Pelagonia corresponds to ancient Pelagonia and the northern part of Lyncestis, which were populated by MolossianThe Cambridge Ancient History Volume 3, Part 3: The Expansion of the Greek World, Eighth to Sixth Centuries BC by John Boardman and N. G. L. Hammond, 1982, , page 284 tribes of Upper Macedonia.

Persia, Macedon and Rome

In the late 6th century BC, the Achaemenid Persians under Darius the Great conquered the Paeonians, incorporating what is today North Macedonia within their vast territories.Timothy Howe, Jeanne Reames. "Macedonian Legacies: Studies in Ancient Macedonian History and Culture in Honor of Eugene N. Borza" Regina Books, 2008, Originally from the Indiana University. Digitalised 3 November 2010 . p. 239 Philip II of Macedon fully annexed Upper Macedonia, whose northern part now lies within North Macedonia,Poulton, Hugh, Who are the Macedonians? C. Hurst & Co. Publishers, 2000, , p. 14. and he founded Heraclea Lyncestis near modern Bitola. After the death of the Paeonian king Agis, the kingdom of Paeonia was led by Lyppeius and it became subject to Philip II by 356 BC, and then to Alexander the Great. Paeonian cavalry led by Ariston of Paionia and Agrianian peltasts followed Alexander's army during his campaigns. Dropion was the last king of Paeonia during the Hellenistic period and Philip V annexed Bylazora in the Antigonid kingdom.

The Romans included most of what is now North Macedonia into their province of Macedonia, but its northern parts, including Skopje, were part of Dardania and then Moesia Superior; by the time of Diocletian, it was split between Macedonia Salutaris with its capital at Stobi, and Dardania.

Medieval period Migration Period

At this period the area divided from the Jireček Line was populated from people of Thraco-Roman or Illyro-Roman origins, as well from Hellenized citizens of the Byzantine Empire and Byzantine Greeks. The ancient languages of the local Thraco-Illyrian and Paeonian people had already gone extinct before the arrival of the Slavs and the following slavicisation, due to hellenization, romanisation and repeated barbaric invasions on the Balkans during the Late antiquity. South Slavic tribes settled in the territory of present-day North Macedonia in the 6th century AD. The Slavic settlements were referred to by Byzantine historians as "Sclavenes". The Sclavenes participated in several assaults against the Byzantine Empire – alone or aided by Bulgars or Avars. Around 680 AD a group, led by a Bulgar named Kuber (who according to some sources belonged to the same Dulo clan as the Danubian Bulgarian Khan Asparukh), settled in the Pelagonian plain, and launched a campaign to the region of Thessalonica.

In the late 7th century Justinian II organized massive expeditions against the Sklaviniai of the Greek peninsula, in which he reportedly captured over 110,000 Slavs and transferred them to Cappadocia. By the time of Constans II (who also organized campaigns against the Slavs), a significant number of Slavs from Macedonia were captured and transferred to central Asia Minor where they were forced to recognize the authority of the Byzantine emperor and serve in its ranks.

Contested between Byzantine, Bulgarian and Serbian realms

Use of the name "Sklavines" as a nation on its own was discontinued in Byzantine records after circa 836 as those Slavs in the Macedonia region became a population in the First Bulgarian Empire. Originally two distinct peoples, Sclavenes and Bulgars, the Bulgars assimilated the Slavic language/identity whilst maintaining the Bulgarian demonym and name of the empire. Slavic influence in the region strengthened along with the rise of this state, which incorporated the entire region to its domain in AD 837. Saints Cyril and Methodius, Byzantine Greeks born in Thessaloniki, were the creators of the first Slavic Glagolitic alphabet and Old Church Slavonic language. They were also apostles-Christianizators of the Slavic world. Their cultural heritage was acquired and developed in medieval Bulgaria, where after 885 the region of Ohrid became a significant ecclesiastical center. In conjunction with another disciple of Saints Cyril and Methodius, Saint Naum, he created a flourishing Bulgarian cultural center around Ohrid, where over 3,000 pupils were taught in the Glagolitic and Cyrillic script in what is now called Ohrid Literary School.

At the end of the 10th century, much of what is now North Macedonia became the political and cultural center of the First Bulgarian Empire under Tsar Samuel; while the Byzantine emperor Basil II came to rule the eastern part of the empire (what is now Bulgaria), including the then capital Preslav, in 972. A new capital was established at Ohrid, which also became the seat of the Bulgarian Patriarchate. From then on, the Bulgarian model became an integral part of wider Slavic culture as a whole. After several decades of almost incessant fighting, Bulgaria came under Byzantine rule in 1018. The whole of North Macedonia was incorporated into the Byzantine Empire as Theme of Bulgaria and the Bulgarian Patriarchate was reduced in rank to an archbishopric, the Archbishopric of Ohrid.

Dobromir Chrysos rebelled against the emperor and after an unsuccessful imperial campaign in autumn 1197, the emperor sued for peace and recognized Dobromir-Chrysus' rights to lands between the Strymon and Vardar, including Strumica and the fortress of Prosek.Paul Stephenson, Byzantium's Balkan Frontier: A Political Study of the Northern Balkans, 900-1204, Cambridge University Press, 29 iun. 2000, p.307

In the 13th and 14th centuries, Byzantine control was punctuated by periods of Bulgarian and Serbian rule. For example, Konstantin Asen – a former nobleman from Skopje – ruled as tsar of Bulgaria from 1257 to 1277. Later, Skopje became a capital of the Serbian Empire under Stefan Dušan. After the dissolution of the empire, the area became a domain of independent local Serbian rulers from the Mrnjavčević and Dragaš houses. The domain of the Mrnjavčević house included western parts of present-day North Macedonia and domains of the Dragaš house included eastern parts. The capital of the state of Mrnjavčević house was Prilep. There are only two known rulers from the Mrnjavčević house – king Vukašin Mrnjavčević and his son, king Marko. King Marko became a vassal of the Ottoman Empire and later died in the Battle of Rovine.

During the period in the 12th, 13th and early 14th century, parts of modern western North Macedonia were under the rule of the Albanian Noble Gropa family, which ruled territories between Ohrid and Debar. The city of Debar and some other territories after the ending rule of Gropa Noble family, were ruled by the Albanian Royal House of Kastrioti which ruled the Principality of Kastrioti during the end of the 14th century and the first half of the 15th century. After the death of the Albanian Prince Gjon Kastrioti in 1437, many parts of his domains were conquered by the Ottoman Empire and shortly after this, during the 15th century were again restored into the Albanian rule of League of Lezhë led by Gjergj Kastrioti Skanderbeg. During this period, western territories of modern North Macedonia became battleground between the Albanian and Ottoman armies. Some of the battles that took place in the territory of Macedonia were the Battle of Polog, Battle of Mokra, Battle of Ohrid, Battle of Otonetë, Battle of Oranik and many others. Skanderbeg's Campaign into Macedonia also took place. With the death of Skanderbeg on 17 January 1468 the Albanian Resistance began to fall. After the death of Skanderbeg the Albanian League was led by Lekë Dukagjini, but it did not have the same success as before and the last Albanian strongholds were conquered in 1479 in the Siege of Shkodër.

Ottoman period

Conquered by the Ottoman army at the end of the 14th century,Michael Palairet, Macedonia: A Voyage through History (Vol. 2, From the Fifteenth Century to the Present), Vol. 2; Cambridge Scholars Publishing, 2016, , p. 2. the region remained a part of the Ottoman Empire for over 500 years, as part of the province or Eyalet of Rumelia. During this in the second half of the 15th century the Albanian Leader of the League of Lezhë, Skanderbeg was able to occupy places in modern western North Macedonia that were under Ottoman rule like the then well known city of Ohrid (Albanian Ohër) in the Battle of Ohrid. Tetovo (Battle of Polog) and many other places. The Albanian forces under Skanderbeg penetrated deep into modern North Macedonia in the Battle of Mokra. But this did not last long and the places were again occupied by the Ottomans. Rumelia (Turkish: Rumeli) means "Land of the Romans" in Turkish, referring to the lands conquered by the Ottoman Turks from the Byzantine Empire.Encyclopædia Britannica – Rumelia at Encyclopædia Britannica.com). Over the centuries Rumelia Eyalet was reduced in size through administrative reforms, until by the nineteenth century it consisted of a region of central Albania and north-western part of the current state of North Macedonia with its capital at Manastir or present day Bitola. Rumelia Eyalet was abolished in 1867 and the territory of North Macedonia subsequently became part of the provinces of Manastir Vilayet, Kosovo Vilayet and Salonica Vilayet until the end of Ottoman rule in 1912.