Asilah is a fortified town on the northwest tip of the Atlantic coast of Morocco, approximately 31 km south of Tangier. Its ramparts and gateworks continue to be fully intact. The metropolis's history dates back to 1500 B.C., while Phoenicians occupied a website called Silis, Zili, Zilis, or Zilil that is being excavated at Dchar Jdid, some 12 km NE of present Asilah; that area changed into once considered to be the Roman stronghold Ad Mercuri, however is now universal to be Zilil. The metropolis of Asilah itself became partially constructed with the aid of the Idrisid dynasty, and Cordoban caliph Al-Hakam II rebuilt the town in 966.
The Portuguese conquered the city in 1471 and constructed its fortifications, but it changed into deserted it because of an monetary debt disaster in 1549. In 1578, Sebastian of Portugal used Asilah as a base for his troops at some stage in a planned crusade that ended in Sebastian's demise, which in turn prompted the Portuguese succession disaster of 1580. In 1589 the Moroccans in short regained control of Asilah, but then misplaced it to the Spanish. In 1692, the city was again taken with the aid of the Moroccans under the management of Moulay Ismail. Asilah served then as a base for pirates in the 19th and 20th centuries, and in 1829, the Austrians punitively bombarded the town because of Moroccan piracy.