er this success, the Almohads installed Walid Abu Hafs as the governor of Tunisia. Tunisia remained part of the Almohad state, until 1230 when the son of Abu Hafs declared himself independent. During the reign of the Hafsid dynasty, fruitful commercial relationships were established with several Christian Mediterranean states. In the late 16th century the coast became a pirate stronghold (see: Barbary States).
In the last years of the Hafsids, Spain seized many of the coastal cities, but these were recovered by the Ottoman Empire. Under its Turkish governors, the Beys, Tunisia attained virtual independence. The Hussein dynasty of Beys, established in 1705, lasted until 1957. The Maghreb suffered from the deadly combination of plague and famine. The great epidemics ravaged Tunisia in 1784–1785, 1796–1797 and 1818–1820.
In 1869, Tunisia declared itself bankrupt and an international financial commission took control over its economy. In 1881, using the pretext of a Tunisian incursion into Algeria, the French invaded with an army of about 36,000 and forced the Bey to agree to the terms of the 1881 Treaty of Bardo (Al Qasr as Sa'id). With this treaty, Tunisia was officially made a French protectorate, over the objections of Italy. Under French colonization, European settlements in the country were actively encouraged; the number of French colonists grew from 34,000 in 1906 to 144,000 in 1945. In 1910 there were 105,000 Italians in Tunisia.
World War II
In 1942–1943, Tunisia was the scene of the third major operations by the Allied Forces (the British Empire and the United States) against the Axis Powers (Italy and Germany) during World War II. The main body of the British army, advancing from their victory in the Battle of el-Alamein under the command of British Field Marshal Montgomery, pushed into Tunisia from the south. The U.S. and other allies, following