The castle was the seat of power in Tripolitania ever since the Turkish Pashas used it as their official headquarters in the 16th century, and remained so until recently when things began to change after the colonial wars at the start of the 20th century. https://www.temehu.com/Cities_sites/Tripoli.htm