The land was the ancient kingdom of Paeonia, just north of Macedon, and Philip II took parts of it in 356 BC. Rome made Macedonia a province in 146 BC, and Stobi later became capital of its Macedonia Salutaris. Slavs settled by the late 6th century, and in 886 Saint Clement started a literary school in Ohrid that helped spread the Cyrillic script.
Byzantium beat Tsar Samuil, who had ruled from Ohrid, in 1014. Skopje was the capital of Stefan Dušan's Serbian empire in the 14th century. The Ottomans took the region after 1395 and held it for five centuries. They left mosques, and the churches and monasteries of the Orthodox world left frescoes, many painted between the 11th and 16th centuries. In 1903 the Ilinden uprising set up the Kruševo Republic. It was crushed with much loss of life.
The Balkan Wars of 1912 and 1913 ended Ottoman rule but split the region, and most of today's territory went to Serbia. After 1945 it became a republic inside socialist Yugoslavia, and Macedonian was standardized and taught in schools. A 1963 earthquake wrecked much of Skopje and killed over 1,000 people. The rebuilding left concrete towers and spomeniks. Independence came in 1991.
Greece delayed recognition over the name for years, and the UN used a long placeholder name. A deal signed in 2018 changed it, with the new name taking effect in February 2019. After 2006 a government put up statues of Alexander the Great across the country, and the white columns and statues in central Skopje still divide residents. An insurgency in 2001 ended with Albanian made co-official. NATO membership came in March 2020, and EU talks opened in 2022 after a Bulgarian veto from 2020.