In antiquity, most of the territory that is now the Republic of Macedonia was included in the kingdom of Paeonia, which was populated by the Paeonians, a people of Thracian origins, but also parts of ancient Illyria and Dardania, inhabited by various Illyrian peoples, and Lyncestis and Pelagonia populated by the ancient Greek Molossian tribes. None of these had fixed boundaries; they were sometimes subject to the Kings of Macedon, and sometimes broke away.
In the late 6th century BC, the Achaemenid Persians under Darius the Great conquered the Paeonians, incorporating what is today the Republic of Macedonia within their vast territories. Following the loss in the Second Persian invasion of Greece in 479 BC, the Persians eventually withdrew from their European territories, including thus from what is today the Republic of Macedonia.
In 336 BC Philip II of Macedon fully annexed Upper Macedonia, including its northern part and southern Paeonia, which both now lie within the Republic of Macedonia. Philip's son Alexander the Great conquered most of the remainder of the region, incorporating it in his empire, with exclusion of Dardania. The Romans included most of the Republic in their province of Macedonia, but the northernmost parts (Dardania) lay in Moesia; by the time of Diocletian, they had been subdivided, and the Republic was split between Macedonia Salutaris and Moesia prima. Little is known about the Slavs before the 5th century.