Its exact founding date is unknown but it appears to have been built at some point during the time Harran was under Byzantine rule (4th–7th centuries) and was originally a palace.
[3] Some scholars believe the castle was founded on top of the ruins of the Ekhulkhul,[5] the ancient pagan moon temple of Harran.
Both the castle and the Harran Grand Mosque [tr] are described in literary sources as having been built on the temple; the castle is further supported on account of its higher elevation[5] but the mosque is generally favored due to having been a place of worship and by evidence such as Babylonian inscriptions and four stelae of the Babylonian king Nabonidus (who restored the Elkhulkhul) having been found among its ruins.
[6] The castle was originally a palace and was only converted into a more militaristic fortress during politically uncertain periods in the 11th to 13th centuries.
[9] Most of the present structure of the castle dates to the time of the Ayyubids[5] c. 1200,[10] following renovation work made conducted by Sultan Al-Adil I (r.
[4] At the time Harran was abandoned and left desolate by the Mongol Empire in 1271, the castle had been heavily damaged.
[12] As part of recent excavation and conservation efforts supported by the Turkish Ministry of Culture and Tourism,[13] the castle was in 2012–2014[14] partially reconstructed using stonework similar to what would have been used in the historical building.