The Moorish Castle is the name given to a medieval fortification in Gibraltar comprising various buildings, gates, and fortified walls, with the dominant features being the Tower of Homage and the Gate House. Although sometimes compared to the nearby alcazars in Spain, the Moorish Castle in Gibraltar was constructed by the Marinid dynasty, making it unique in the Iberian Peninsula.
The Moorish occupation is by far the longest in Gibraltar's recorded history, having lasted from 711 to 1309 and then again from 1333 to 1462, a total of 727 years.
Construction of the Moorish Castle commenced in the 8th century AD. Its walls enclosed a considerable area, reaching down from the upper part of the Rock of Gibraltar to the sea. The most conspicuous remaining parts of the Castle are the upper tower, or Tower of Homage, together with various terraces and battlements below it, and the massive Gate House, with its cupola roof.
The present Tower of Homage, and most of what is visible today of the Castle, was rebuilt during the second Moorish period of occupation in the early 14th century, after its near destruction during a reconquest of Gibraltar by the Moors following a re-occupation by Spanish forces from 1309 to 1333.
References:The Château de Foix dominates the town of Foix. An important tourist site, it is known as a centre of the Cathars. Built on an older 7th-century fortification, the castle is known from 987. In 1002, it was mentioned in the will of Roger I, Count of Carcassonne, who bequeathed the fortress to his youngest child, Bernard. In effect, the family ruling over the region were installed here which allowed them to control access to the upper Ariège valley and to keep surveillance from this strategic point over the lower land, protected behind impregnable walls.
In 1034, the castle became capital of the County of Foix and played a decisive role in medieval military history. During the two following centuries, the castle was home to Counts with shining personalities who became the soul of the Occitan resistance during the crusade against the Albigensians.