Tunisia, also called the Republic of Tunisia, is the northernmost nation in Africa. It is a part of the Maghreb quarter of North Africa and is bordered by Algeria to the southwest and west, Libya to the southeast, and the Mediterranean Sea to the east and north; 63,170 sq mi (covering 163,610 km2).
Today, we will look at the History of Tunisia in the Middle Ages:
Sometime between the latter half of the 7th century CE and the early part of the 8th century CE, Arab Islamic invasion occurred in the country. They established the first Islamic city in Northwest Africa, Kairouan. In 670 CE, the Mosque of Uqba, or the Great Mosque of Kairouan, was built. This mosque is the most prestigious sanctuary and the oldest in the Muslim West, with the oldest standing tower globally; it is also held a treasure of Islamic art and design.
Tunis was captured in 695 CE, re-taken by the Byzantine Eastern Romans in 697 CE, but lost permanently in 698 CE. The shift from a Latin-speaking Christian Berber culture to a Muslim and principally Arabic-speaking society took over 350-500 years (the process in Egypt and the Fertile Crescent took almost 600 years) and resulted in the final disappearance of Latin and Christianity in the 12th or 13th centuries CE. The bulk of the population was not Muslim until quite late in the 9th century; CE, a vast bulk was during the 10th. Also, some Tunisian Christians emigrated; some more affluent members of society did so after the conquest in 698 CE, and Norman kings welcomed others to Italy or Sicily in the 11th and 12th centuries CE – the logical destination because of the 1200 year close connection between the two countries.
The Normans of Sicily captured the main Tunisian towns under the Kingdom of Africa in the 12th century CE, but following the conquest of Tunisia in 1159–1160 CE by the Almohads, the Normans were abandoned to Sicily. Communities of Tunisian Christians would still survive in Nefzaoua up to the 14th century CE. The Almohads originally ruled over Tunisia through a governor, usually near kin of the Caliph. Despite the influence of the new masters, the nation was still violent, with constant fighting and rioting between the townsfolk and wandering Turks and Arabs, the latter being subjects of the Islamic Armenian adventurer Karakush. Also, Tunisia was conquered by Ayyubids between 1182 CE and 1183 CE and again between 1184 CE and 1187 CE.
The most prominent threat to Almohad control in Tunisia was the Banu Ghaniya, in-laws of the Almoravids, who, from their base in Mallorca, tried to revive Almoravid rule over the Maghreb. Around 1200 CE, they succeeded in stretching their authority over the whole of Tunisia until Almohad troops defeated them in 1207 CE.
After this success, the Almohads inducted Walid Abu Hafs as the governor of Tunisia. Tunisia remained part of the Almohad state until 1230 CE, when the son of Abu Hafs declared himself sovereign. During the reign of the Hafsid dynasty, kings established fruitful commercial relationships with many Christian Mediterranean states. In the late 16th century CE, the coast became a medieval pirate stronghold.