The castle is named after St. Hilarion, a hermit monk who fled from persecution in the Holy Land and lived and died in a cave in the mountains. Later in the 10th century, the Byzantines built a church and monastery here. Along with Kantara and Buffavento castles, St. Hilarion was originally built as a watch tower to give warning of approaching pirates who launched a continuous series of raids on Cyprus and the coasts of Anatolia. Although the monastery and a church were built here originally, the first references to the castle are found in 1191 records.
The other question that may come immediately to mind: is it safe in Northern Cyprus? -It is safe. It’s not like e.g., North and South Korea. Anyway, I still recommend to check the current situation before visiting Northern Cyprus, things may change, rules may change.