The earliest history of Madagascar is unclear. Africans and Indonesians reached the island in about the 5th cent. A.D., the Indonesian immigration continuing until the 15th cent. From the 9th cent., Muslim traders (including some Arabs) from E Africa and the Comoro Islands settled in NW and SE Madagascar. Probably the first European to see Madagascar was Diogo Dias, a Portuguese navigator, in 1500. Between 1600 and 1619, Portuguese Roman Catholic missionaries tried unsuccessfully to convert the Malagasy. From 1642 until the late 18th cent. the French maintained footholds, first at Taolagnaro (formerly Fort-Dauphin) in the southeast and finally on Sainte Marie Island off the east coast.
By the beginning of the 17th cent. there were a number of small Malagasy kingdoms, including those of the Antemoro, Antaisaka, Bétsiléo, and Merina. Later in the century the Sakalawa under Andriandahifotsi conquered W and N Madagascar, but the kingdom disintegrated in the 18th cent. At the end of the 18th cent. the Merina people of the interior were united under King Andrianampoinimerina (reigned 1787–1810), who also subjugated the Bétsiléo. Radama I (reigned 1810–28), in return for agreeing to end the slave trade, received British aid in modernizing and equipping his army, which helped him to conquer the Betsimisáraka kingdom. The Protestant London Missionary Society was welcomed, and it gained many converts, opened schools, and helped to transcribe the Merina language. Merina culture began to spread over Madagascar.
Radama was succeeded by his wife Ranavalona I (reigned 1828–1861), who, suspicious of foreigners, declared (1835) Christianity illegal and halted most foreign trade. During her rule the Merina kingdom was wracked by intermittent civil war. Under Radama II (reigned 1861–63) and his widow and successor Rasoherina (reigned 1863–68) the anti-European policy was reversed and missionaries (including Roman Catholics) and traders were welcomed again. Rainilaiarivony, the prime minister, controlled the government during the reigns of Ranavalona II (1868–83) and Ranavalona III (1883–96); by then the Merina kingdom included all Madagascar except the south and part of the west. Ranavalona II publicly recognized Christianity, and she and her husband were baptized.
In 1883 the French bombarded and occupied Toamsina (then Tamatave), and in 1885 they established a protectorate over Madagascar, which was recognized by Great Britain in 1890. Rainilaiarivony organized resistance to the French, and there was heavy fighting from 1894 to 1896. In 1896, French troops under J. S. Gallieni defeated the Merina and abolished the monarchy.
By 1904 the French fully controlled the island. Under the French, who governed the Malagasy through a divide-and-rule policy, development was concentrated in the Tananarive region, and thus the Merina benefited most from colonial rule. Merina nationalism developed early in the 20th cent., and in 1916 (during World War I) a Merina secret society was suppressed by the French after a plot against the colonialists was discovered.
During World War II, Madagascar was aligned with Vichy France until 1942, when it was conquered by the British; in 1943 the Free French regime assumed control. From 1947 to 1948 there was a major uprising against the French, who crushed the rebellion, killing between 11,000 and 80,000 (estimates vary) Malagasy in the process. As in other French colonies, indigenous political activity increased in 1956, and the Social Democratic party (PSD), led by Philibert Tsiranana (a Tsimihety), gained predominance in Madagascar.
On Oct. 14, 1958, the country—renamed the Malagasy Republic—became autonomous within the French Community and Tsiranana was elected president. On June 26, 1960, it became fully independent. Under Tsiranana (reelected in 1965 and 1972), an autocratic ruler whose PSD controlled parliament, government was centralized, the coastal peoples ( côtiers ) were favored over those of the interior (especially the Merina), and French economic and cultural influence remained strong. Beginning in 1967, Tsiranana cultivated economic relations with white-ruled South Africa.
In 1972, students and workers, discontented with the president's policies and with the deteriorating economic situation, staged a wave of protest demonstrations. At the height of the crisis Tsiranana handed over power to Gen. Gabriel Ramanantsoa, who became prime minister. In Oct., 1972, a national referendum overwhelmingly approved Ramanantsoa's plan to rule without parliament for five years; Tsiranana, who opposed the plan, resigned the presidency shortly after the vote.
Ramanantsoa freed political prisoners jailed by Tsiranana, began to reduce French influence in the country, broke off relations with South Africa, and generally followed a moderately leftist course. In 1975, a new constitution was approved that renamed the Malagasy Republic the Democratic Republic of Madagascar. That same year, Ramanantsoa dissolved his government in response to mounting unrest in the military and internal disagreements regarding economic policy. Col. Ratsimandrava assumed power but was assassinated a month later and Lt. Comdr. Didier Ratsiraka was elected president in a referendum.
The military-backed Supreme Revolutionary Council (CSR), with Ratsiraka as its head, comprised the government's executive branch. Ratsiraka's Marxist-socialist government nationalized most of the economy and borrowed widely to pay for major investments in development. The nation fell into a crippling debt crisis. Ratsiraka's policies of censorship, regional divisiveness, and repression led to several coup attempts in the 1980s, while food shortages and price increases caused further social unrest. In foreign affairs, Madagascar under Ratsiraka strengthened ties with the United States and Europe and continued to distance itself from South Africa.
Ratsiraka was reelected in 1989 under suspicious circumstances and rioting ensued. Madagascar's political and economic upheaval prompted the government to establish a multiparty system and move toward the privatization of industry in the 1990s. After demonstrations and a lengthy general strike in 1991, Ratsiraka agreed to share power with opposition leader Albert Zafy in a transitional government. In a free presidential election held in 1993, Zafy overwhelmingly defeated Ratsiraka.
In 1995, Zafy won passage of a constitutional amendment allowing the president, rather than the national assembly, to choose a prime minister. With the economy deteriorating, protesters staged street demonstrations in Feb., 1996, and there were some calls for an army takeover. Dissatisfaction with Zafy led to his impeachment by the national assembly in July, 1996. In elections later that year, Ratsiraka came back to defeat Zafy, promising a program of humanistic and ecological development; he also announced plans for a referendum to revise the constitution. Elections in 1998 sent 63 members of Ratsiraka's AREMA party into the newly enlarged national assembly.
In the Dec., 2001 presidential elections, opposition leader Marc Ravalomanana claimed victory over Ratsiraka, but the government announced that he had won only 46% of the vote, forcing a runoff. Ravalomanana denounced reported results and proclaimed himself president, creating a standoff between his and Ratsiraka's supporters. Although Ravalomanana gained control of the capital, Ratsiraka moved his government to Toamasina and had strong support outside the capital and in much of the army.
A recount in Apr., 2002, which was negotiated by the Organization of African Unity (OAU) and agreed to by both candidates, declared Ravalomanana the winner, but Ratsiraka rejected those results. Forces supporting Ravalomanana gradually won control of most of the island (except Toamasina prov.) by early July, when Ratsiraka fled Madagascar. The African Union, the OAU's successor, initially refused to recognize the new government and called for new elections. In Dec., 2002, Ravalomanana's party won a majority in elections for a new legislature, and the African Union subsequently recognized the new government. Ratsiraka was tried in absentia and convicted on charges of embezzlement in 2003.
Ravalomanana moved to privatize state-owned companies and successfully sought international aid and foreign investment. His government, however, sometimes limited freedom of the press and other political freedoms. In 2005 the government banned the New Protestant Church (FPVM), a growing charismatic church that had split (2002) from the mainline Reformed Protestant Church of Jesus Christ (FJKM). The president, a lay leader in the FJKM, was accused of favoring one church over another in violation of the constitution, but the courts refused to overturn the decision.
The president was reelected in Dec., 2006, but the election was marred by the exclusion of a major opposition candidate, Pierrot Rajaonarivelo, who was in exile and was not allowed to return and register for the election. In addition, in November, there was an attempted coup against the president by a retired army general who was also not allowed to run; although it was unsuccessful, many of the presidential candidates called his a coup a move in defense of the constitution. In late 2006 and early 2007 Madagascar suffered its worst cyclone (hurricane) season in memory, with six storms hitting the country, affecting some 450,000 inhabitants. Legislative elections in Sept., 2007, again gave the president's party a majority of the seats.
In Dec., 2008, in a feud that was as much personal as it was political, Antananarivo mayor Andry Rajoelina began leading demonstrations demanding the president's resignation after Rajoelina's television station was briefly closed by the government. The protests, which tapped into popular discontent, led to street violence in late January and early February; also in early February Ravalomanana dismissed the mayor from office. Talks failed to resolve the conflict, and in March a military mutiny forced the president to resign; he went into exile. The new army chief handed the presidency to Rajoelina (though he was constitutionally too young for the office) in a de facto coup; Ravalomanana's ouster was denounced by the African Union, which suspended Madagascar. Ravalomanana's supporters, who mounted demonstrations in his favor, announced their own government in April; its prime minister, Manandafy Rakotonirina, was arrested.
Attempts by the United Nations and African Union to negotiate a settlement were initially unsuccessful, and in the June a Madagascar court sentenced the former president in absentia to four years in prison for abuse of office. In August, however, the four main political parties agreed to establish a transitional government leading to elections in 2010, but Rajoelina's move (September) to unilaterally appoint the government threatened the accord. In October, an agreement was reached concerning the government (with Rajoelina as president), but Ravalomanana refused to sign it because Rajoelina was not excluded from running for president.
Negotiations over the makeup of the government continued, but in December Rajoelina abandoned the negotiations, barred opposition leaders (including members of the power-sharing government) from returning to Madagascar, called for new parliamentary elections, and appointed a new prime minister. Attempts since to restart negotiations and reestablish the power-sharing government have failed, leading to an ongoing loss of foreign aid that has contributed to deteriorating economic conditions. Dissatisfaction in the military with the situation led in 2010 to tensions between the military and the government and within the military. In Aug., 2010, Ravalomanana was convicted in absentia on murder charges arising the from killings of Rajoelina supporters by the presidential guard in Feb., 2009, and sentenced to life in prison. Also in August, Rajoelina signed an accord with 99 minor political parties that confirmed him as president and called for a constitutional referendum in November and legislative and presidential elections in 2011.
The new constitution was approved in Nov., 2010, but at the same time Rajoelina also faced an unsuccessful coup attempt by dissident army elements. In Nov., 2011, a new prime minister, Omer Beriziky, was appointed following a 10-party September agreement, brokered by the Southern African Development Community (SADC), on restoring a democratic government. Also that month, former president Ratsiraka, who objected to the agreement, returned to the country after nine years of exile. When Ravalomanana attempted to return in Jan., 2012, however, Madagascar closed its airspace and denied him entry, leading to tensions in the recently formed government as the former president's party protested the action.
An agreement in Jan., 2012 called for a presidential election in May, 2013; Rajoelina and Ravalomanana both agreed not to run. Subsequently, Ravalomanana's wife became a candidate, and Rajoelina also entered the race. The election date was pushed back first to July and then to August; in the latter month the election commission disqualified Rajoelina, Lalao Ravalomanana, and Ratsiraka from running and rescheduled the election again, to October.
Richard Jean-Louis Robinson, a cabinet minister under Ravalomanana, and Hery Rajaonarimampianina, a cabinet minister under Rajoelina, placed first and second after the first round (October) of the presidential election, in what was generally seen as a proxy contest between Ravalomanana and Rajoelina. The second round, in Dec., 2013, resulted in a victory for Rajaonarimampianina, who received more that 53% of the vote, but Robinson accused the government of fraud and irregulaties and rejected the result. Prior to the second round, military officers had been named governors of a third of the country's regions.