Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
During the 7th century the region of Tunisia was conquered by Arab troops led by the Ghassanid general Hassan Ibn Numan. The city had the natural advantage of coastal access, via the Mediterranean, to the major ports of southern Europe. Early on, Tunis played a military role — the Arabs recognized the strategic importance of its proximity to the Strait of Sicily. From the earliest years of the 8th century, Tunis was the chef-lieu of this area: it became the Arabs' naval base in the western Mediterranean, and took on considerable military importance, and with a strategic location, the city grew, and with it grew the mosques for the Muslims to pray in.