The landscape is dominated by the Rock of Gibraltar at the foot of which is a densely populated city area, home to over 30,000 people, primarily Gibraltarians.
Subsequently, Gibraltar became known as one of the Pillars of Hercules, after the Greek legend of the creation of the Strait of Gibraltar by Heracles.
The Carthaginians and Romans also established semi-permanent settlements.
After the collapse of the Roman Empire, Gibraltar came briefly under the control of the Vandals, who crossed into Africa at the invitation of Boniface, the Count (or commander) of the territory.
The area later formed part of the Visigothic Kingdom of Hispania from 414 AD until the Islamic conquest of Iberia in 711 AD.
In 1160, the Almohad Sultan Abd al-Mu'min ordered that a permanent settlement, including a castle, be built.