The prosperity of Afyon Kara Hisar today is due also though to a lesser extent to its railway junction, though this is less important than that of Eskishehir.It is the point where the Istanbul-Konya line connects with the lines leading to Pisidia and Izmir. The “Black Castle of Opium” owes its name to the fortress erected on the peak of black trachyte that surrounded by similar hills dotted over the steppe like so many islands stands some 650 feet above the town in the plain.
The site of the town corresponds to that of the old Byzantine fortress of Acroinus near which the Emperor Leo III the Isaurian defeated an Arab invasion in 740. It was conquered by the Turks, probably at the end of the 12th or the beginning of the 13th century, as is shown by the inscription on the Altigoz Koprusu bridge with the date 1209. The Seljuk Grand Vizier, Sahib Ata Fahr Ed-din, settled there round about 1260 when he had been driven from Konya by the Mongols; he called the town Karahisar-i Sahib and it retained this name until the 16th century when it was officially named Afyon Karahisar (the “Black Castle of Opium”) a name that had been current among the people for a long time because of the extensive production of opium throughout the surrounding region.
After being the fief of Sahib Ata and his immediate descendants, the town came into the possession of the Emirs of Germiyan at the end of the 13th century. It was conquered by the Ottomans first in 1390 and then again, definitively, in 1428. In the 17th century it fell on several occasions into the hands of the pashas who were rebelling aganist the sultan, and in the 19th century it was occupied by Ibrahim Pasha, the son of Mehmet Ali. During the War of Independence, which hit the town badly, it was occupied by the Greeks (March- April and July- August 1922).

On the peak overlooking Afyon Stands a Byzantine citadel (Afyon Kalesi) that has been restored many times but is now ruins. In the town, note the Great Mosque (Ulu Cami) dating from 1272, with wooden columns supporting the ceiling of the prayer hall; the Tomb of Sultan Divani; and the Mosque of Ahmet Gedik Pasha with its annexes, including a madrasah now transformed into an Archaeological Museum. The museum contains objects found during excavations condocted in the region proto historical items, Phrygian and Hittite objects, and remains from the Hellenistic and Byzantine periods. Part of the Museum is devoted to Islamic art and local folk traditions.