When the Arab Muslim troops conquered the region at the end of the 7th century, they established themselves at the outskirts of ancient Tunes, and the small town soon became the city of Tunis that could easily be taken for an Arab foundation. The medina of Tunis, the oldest section of the city, dates from this period, during which the region was conquered by the Umayyad emir Hasan ibn al-Nu'man al-Ghasani. 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 beginning of the 8th century, Tunis was the ''chef-lieu'' of the area: it became the Arabs' naval base in the western Mediterranean Sea, and took on considerable military importance. Under the Aghlabids, the people of Tunis revolted numerous times, but the city benefited from economic improvements and quickly became the second most important in the kingdom. It was briefly the national capital, from the end of the reign of Ibrahim II in 902, until 909 when control over Ifriqiya was lost to the newly founded Fatimid Caliphate.