Exilissa was probably established as a
Phoenician colony, annexed by the
Carthaginians, and then lost to
Roman control sometime after the
Punic Wars. Under the Romans, it was a
salting post. It would've been overrun by the
Vandals in the 5th century and then reconquered by the
Byzantines in the 6th. Ksar Mesmouda was established after the
Umayyad conquest of the area in 708-709 CE. In 971, the
Umayyad Caliph of
al-Andalus tried to capture the fort as a stepping stone to a projected conquest of
Idrisid Morocco. During the
Almoravid and
Almohad eras, it was used as a major shipyard. But with the end of Marinid adventures across the sea in Spain, it declined in use. By the 15th century, it had become a notorious
corsair's nest, preying on shipping in the Straits of Gibraltar. In 1458, a
Portuguese expeditionary force of 25,000 men and 200 ships led by King
Afonso V of Portugal, assaulted and captured the town after a two-day battle on 23–24 October. In 2007, a new commercial cargo port,
Tanger-Med began being built nearby, around twelve kilometers to the northeast of Ksar Sghir. ==See also==