Beginning in the 1790s, Merina rulers succeeded in establishing hegemony over the major part of the island, including the coast. In 1817, the Merina ruler, King Radama I, and the British governor of Mauritius concluded a treaty abolishing the slave trade, which had been important in Madagascar's economy. In return, the island received British military and financial assistance. British influence remained strong for several decades, during which the Merina court was converted to Presbyterianism, Congregationalism, and Anglicanism.
The British accepted the imposition of a French protectorate over Madagascar in 1885 in return for eventual control over Zanzibar (now part of Tanzania) and as part of an overall definition of spheres of influence in the area. Absolute French control over Madagascar was established by military force in 1895-96, and the Merina monarchy was abolished.
Malagasy troops fought in France, Morocco, and Syria during World War I. After France fell to the Germans, Madagascar was administered first by the Vichy government and then in 1942 by the British, whose troops occupied the strategic island to preclude its seizure by the Japanese. The Free French received the island from the United Kingdom in 1943.
In 1947, with French prestige at low ebb, a nationalist uprising was suppressed only after several months of bitter fighting. The French subsequently established reformed institutions in 1956 under the Loi Cadre (Overseas Reform Act), and Madagascar moved peacefully toward independence. The Malagasy Republic was proclaimed on October 14, 1958, as an autonomous state within the French Community. A period of provisional government ended with the adoption of a constitution in 1959 and full independence on June 26, 1960.
During 1992-1993, free presidential and National Assembly elections were held, ending 17 years of single-party rule.