Built on top of a hill, the imposing Silves Castle is Roman in origin, but it was the Arabs who built the magnificent castle we see today, between the 8th and 13th centuries. Built of Silves sandstone, the castle has the shape of an irregular polygon and a main gate flanked by two defensive towers, three turrets and seven sides. Visitors can walk around the patrol route. There are a number of remains from the period of Muslim occupation on the inside of the castle, in particular a silo which was used for storing cereals and a cistern covered by a vault seated on five semi-circular arches. Despite having been rebuilt in the 13th century after the city was taken from the Moors by D. Paio Peres Correia, Silves Castle is the best example of Arab military architecture in Portugal.