Kozani does not have as famous a history in ancient times as other cities in Greece. However, important archaeological finds have been discovered since the end of prehistory, such as the necropolis dating from the Iron Age. There are also traces of the settlement of Kalyvia, between 1100 and 1300 BC on the hill of Siopotos. In 1392, settlers from Epirus - namely Premeti, Vithikouki and Kozdiani - fled to the settlement of Kalyvia and built their houses a little further east of the settlement. Thus, they created a unified community, with Kozani's first recorded reference being to a sultan's firman in 1528. There are many theories about how Kozani got its name, with the most prevalent one wanting the settlers of Epirus to call their new settlement Kozdiani, which in the process became Koziani and finally Kozani. Due to the fact that it was under the protection of the Sultan's suitcase, Kozani had no conquerors until the 19th century. An important event was the foundation of the library in 1668, which is now the second largest library in Greece, after that of Athens and is called Coventarius. It has 153,000 volumes, 380 manuscripts, rare editions and one of the 17 surviving originals of the Rigas Feraios Charter of Greece. The looting of Kozani in 1803 by Aslan Bey stopped the development of the city, while its inhabitants participated with the rest of the Greeks in the Revolution of 1821. A few years later, the inhabitants of Kozani fought for their freedom during the Macedonian Struggle. They were liberated from the Turks in 1912, while in 1923 during the population exchange between Greece and Turkey, several refugees settled in the southeast of the city.