Tripoli's castle is built into the southeast corner of the city wall, overlooking the harbor. The existing plan of the main complex is Ottoman, with a mosque, harem and many courtyards, but the castle is undoubtedly built on the foundations of earlier fortresses. The intricate network of paths within the castle reflects the style of winding arcaded streets seen in the old city. The fortress has been added to by each successive generation of Tripoli's rulers, and thus contains a mix of architecture and decoration. The main gateway dates from the 16th century, and shows the influence of the Spanish rulers at the time.
No longer used for defensive purposes, the castle was renovated and opened in 1988 as the Libyan Arab Jamahiriya Museum, housing cultural artifacts from all periods in Libya's history.