In 1810s , Great Britain , the Netherlands , France and the United States dispatched naval vessels to North Africa to stop the pirates based in the Barbary States (Tripoli ,
Tunis
and Algiers) which resulted in
Tunisia
banning piracy in 1816 . In 1846 the Bey of Tunis abolished slavery , which although being a reform , it , like the end of highly profitable raids by Tunisian corsairs , caused a heavy weight on the country's treasury and necessitated heavy borrowing from European banks . By 1869 the country's control of its fi¬nances was handed over to an international commission to manage the payment of the loans to the creditors . In 1881 , about 30 , 000 French troops were sent into Tunisia on the pretext of stopping border raids by Tunisian tribesmen into French-occupied Algeria . However , these troops stayed in Tunisia and although the Bey was allowed to remain as Tunisia's titular head , he was forced to sign the Treaty of Kassar Said , which granted real power to the French resident-general . Braitain , which was at that time France's great colonial rival , accepted French domination of Tunisia in exchange for French acceptance for the British occupation of Cyprus .
Two justice systems were established by the 1883 Convention
of
La Marsa
in which Europeans were judged under French law and local Tuni¬sians under a modified form of Islamic law . The French were able to get their hands on the best fertile land without confiscating property from individuals by taking over large tracts of the
Cap Bon
Peninsula and the Medjerda Valley that had previously been controlled by the bey or used by nomads for grazing . On the other hand , the south was largely abandoned because it was difficult for agriculture , until the beginning of the 20th century when phosphate was discovered in the hills west of
Gafsa
where the French carried on massive mining operations .