Kastoria is believed to have ancient origins. Livy (XXXI, XL) mentions a town near a lake in Orestis, called Celetrum, whose inhabitants surrendered to Sulpitius during the Roman war against Philip V of Macedon (200 BC).
The ancient town was possibly located on a hill above the town's current location.The Roman Emperor Diocletian (ruled 284–305 AD) founded the town of Diocletianopolis somewhere in the vicinity. Procopius (De aedificiis, 4.3.1-4) relates that, after Diocletianopolis was destroyed by barbarians, Emperor Justinian relocated it on a promontory projecting into Lake Orestiada, the town's current location, and "gave it an appropriate name", perhaps indicating that he renamed it Justinianopolis. Th. L. Fr. Tafel, in his study on the Via Egnatia (De via militari Romanorum Egnatia, 1832), suggested that Celetrum, Diocletianopolis, and Kastoria are three successive names of the same place.
Kastoria itself does not appear, however, until the Byzantine–Bulgarian wars of the late 10th/early 11th century (the mention of Diocletianopolis in Constantine Porphyrogennetos' De Thematibus is anachronistic, drawing from the 6th-century Synecdemus). The town was in Bulgarian hands until 1018, when it was conquered by Basil II. Kastoria was occupied by the Normans under Bohemond I in 1082/83, but was soon recovered by Alexios I Komnenos. The town had a significant Jewish presence, most notably the 11th-century scholar Tobias ben Eliezer. During the 13th and 14th centuries, the town became contested between several powers and changed hands often.
The Second Bulgarian Empire held the city under Kaloyan and Ivan Asen II, until it was recovered by the Despotate of Epirus. The Nicaean Empire captured it in ca. 1252, but lost it again to Epirus in ca. 1257, only for the Nicaeans to recapture it following the Battle of Pelagonia (1259). In the early 14th century, Kastoria was part of the domain of John II Doukas, "doux of Great Vlachia and Kastoria". After his death, the town became part of the semi-autonomous domain of Stephen Gabrielopoulos.
After the latter's death in 1332/3, the Byzantine emperor Andronikos III Palaiologos took over the town, but in the very next year (1334) it was surrendered briefly to the Serbs by the renegade Syrgiannes Palaiologos. The Serbian ruler Stephen Dushan finally captured Kastoria in 1342/3, taking advantage of the ongoing Byzantine civil war, and made it part of his Serbian Empire. After Dushan's death, Kastoria became seat of Symeon Uroš. The town came later under the Epirote ruler Thomas Preljubović, and finally by the Albanian Muzaka family, until it was conquered by the Ottoman Empire in the mid-1380s.
The Ottomans conquered Kastoria around 1385, but it is unclear whether by force or by an agreement with its Albanian rulers. During the Ottoman period Kastoria acquired a sizeable Muslim population and several mosques and tekkes could be found in the city. The city would remain under Ottoman rule until the First Balkan War (1912), when Greece took it. The 1913 treaties of London and Bucharest incorporated Kastoria into the Greek state. Following the end of the First World War the bulk of the Muslim element of Kastoria's population was transferred to Mustafapaşa, Turkey during the Greek-Turkish population exchange.
During the Ottoman times, Kastoria attracted a multitude of people from across the Balkans and beyond, resulting in a diverse, multi-ethnic community. As a result, the city plan was radically transformed. The different ethnic communities, Turkish, Greek and Jewish, became centred around separate neighbourhoods or ‘quarters’. Two old Greek lakeside quarters, the “Dolcho” and “Apozari” neighbourhoods, are among the best-preserved and last remaining traditional quarters of the city.
These neighbourhoods are characterised by the rich stock of old houses preserved in the shape of autonomous historic buildings, such as the important private mansions or the more humble folk dwellings (‘accessory’ buildings) built between the 17th and 19th centuries. During this time, the processing and exporting of animal furs to Europe created wealth, and city mansions, of particular architectural and decorative value, were built. This interconnected nexus of churches and private houses constitutes a rare example of a Byzantine and post-Byzantine township, and remains inhabited to this day.
The traditional buildings and manor houses of the “Dolcho” and “Apozari” neighbourhoods are threatened by modern development in the city, as well as structural degradation from poor levels of conservation. These sites were included on the 7 Most Endangered list of Europe’s most at-risk monuments and sites in 2014.
During both World War II and the Greek Civil War, the town was repeatedly fought over and heavily damaged in the process. It was nearly captured by the Communist Democratic Army of Greece in 1948, and the final battles of the civil war took place on the nearby Mount Gramos in 1949.
In 1940 the Jewish population in Kastoria numbered 900, composed predominantly of Ladino language speaking Sephardic Jews. Many family names were of Italian origin as a result of emigrations (originally from Spain) via Italy in 17th and 18th centuries.In late March 1944, under Nazi German occupation during World War II, 763 Kastorian Jews were taken prisoner by Nazi troops and sent to Auschwitz-Birkenau,as part of a program of deliberate extermination of Jews during the Holocaust. Kastoria was liberated by the guerrillas of the Greek People's Liberation Army less than 4 months after the Jewish citizens were forced to the concentration camps. By the end of the war in 1945, only 35 of the original population had survived, the vast majority of the community having been killed in concentration camps.
Source: www.wikipedia.org