Settled by the Phoenicians, the area became a powerful state under the dynasty of the Berber Hafsids (1207–1574). Tunisia was nominally a part of the Ottoman Empire from the end of the 17th century and descendants of the original Ottoman ruler remained Beys of Tunis until the modern state of Tunisia was established. A French protectorate since 1883, Tunisia saw considerable anti-French activity in the late 1930s. However, Tunisia supported the Allies in the Second World War and was the scene of heavy fighting. France granted internal self-government in 1955 and Tunisia became fully independent on 20 March 1956. A constitutional assembly was established and Habib Bourguiba became prime minister. A republic was established in 1957, the Bey deposed and the monarchy was abolished; Bourguiba became president. In 1975 the constitution was changed so that Bourguiba could be made President-for-life. Bourguiba was overthrown in a bloodless coup in 1987. His successor as president, Zine El Abidine Ben Ali, introduced democratic reforms but a long running struggle with Islamic fundamentalists has been marked by sporadic violence and the suspension of political rights.