The History of French-era Tunisia commenced in 1881 with the French protectorate and ended in 1956 with Tunisian independence. The French presence in Tunisia came five decades after their occupation of neighboring Algeria. Both of these lands had been associated with the Ottoman Empire for three centuries, yet each had long since attained political autonomy. Before the French arrived, the Bey of Tunisia had begun a process of modern reforms, but financial difficulties mounted, resulting in debt. A commission of European creditors then took over the finances. After the French conquest of Tunisia the French government assumed Tunisia's international obligations. Major developments and improvements were undertaken by the French in several areas, including transport and infrastructure, industry, the financial system, public health, administration, and education. Although these developments were welcome, nonetheless French businesses and citizens were clearly being favored over Tunisians. Their ancient national sense was early expressed in speech and in print; political organization followed. The independence movement was already active before World War I, and continued to gain strength against mixed French opposition. Its ultimate aim was achieved in 1956.
As the 19th century commenced, the Husaynid dynasty Bey remained the hereditary ruler the country. Since the early 18th century Tunisia had been effectively autonomous, although still 'officially' an Ottoman province. Commerce and trade with Europe increased dramatically following the Napoleonic wars. Western merchants especially Italians arrived to establish businesses in the major cities. Italian farmers, tradesmen, and laborers also immigrated to Tunisia. With the rapid surge in contacts with Europe, foreign influence grew.