The history of the Comoros archipelago has largely been determined by the geographical location of the islands. Traders and seafarers from Africa and Madagascar were attracted to the islands because they provided fertile soil, timber for building boats, and important stops on long-distance trade routes. By the 15th century, trading towns had been built, and they played a significant part in regional trade, selling food or Malagasy slaves to pirates or to visiting European company ships. In the late 18th century the islands suffered severely from slave raids. Sakalava and Betsimisaraka chiefs from northern Madagascar conducted the raids to capture and enslave Comorians. During this period all the towns were fortified with citadels and town walls, many of which form a picturesque background to the modern urban scene. By the 1840s Malagasy chiefs controlled Mayotte and Mwali, and in 1843 one of these, Andriansouli, ceded Mayotte to the French. French influence gradually dominated all the islands, and they became a French protectorate in 1886.
The promoters of French plantation companies obtained forced labor from the peasantry of the Comoros, who had to lease their land from the companies. In 1912 the islands were formally made a colony and placed under the government of the French colony of Madagascar, after they had experienced nearly 30 years of exploitation by French land company promoters. Toward the beginning of World War II (1939-1945), the colonial administration in Madagascar sided with the French Vichy government, which collaborated with the occupying German Nazis. Afraid that the islands might fall to the Japanese and be used as bases for submarine attacks, British forces invaded the Comoros and Madagascar in 1942 and restored them to the Free French government of Charles de Gaulle. In 1946 the Comoros were given their own conseil general (general council), and they were separated from the government of Madagascar in 1960. In that same year Madagascar became an independent republic, but the Comoros stayed under French rule.
A referendum on independence was held in the Comoros in 1974, when Mayotte voted by a small majority to remain with France. France put up no opposition when the other three islands declared their independence in 1975. Since 1975, however, France has continued to play a dominant role in the life of the islands and has made use of mercenaries four times to bring about changes in regime. Comoros remains closely tied to France and its interests in the Indian Ocean.
After elections were held in Comoros in March 1996, the elected president, Mohamed Taki Abdulkarim, drafted a new constitution that extended the authority of the president and established Islam as the basis for all legislation. Discontent with Taki soon spread across the country, and in mid-1997 the islands of Nzwani and Mwali separately declared their independence from the Comoros. (The United Nations has not recognized the independence of the islands.) In September dozens of Comorian troops were killed in a failed military operation to put down the secession on Nzwani. In late 1998 Taki died of a heart attack and was succeeded by an interim president. In April 1999 representatives from the three islands attended talks, mediated by the Organization of African Unity (OAU), that were aimed at restoring unity. An agreement was reached that would restore a looser federation, with increased autonomy for the two smaller islands. Only the Nzwani delegation refused to sign the accord, saying it had to consult its people. Within days, riots broke out on Njazidja aimed at people from Nzwani. On April 30 the army staged a bloodless military coup, claiming it was necessary to restore order. The interim government was dissolved, and army chief of staff Colonel Azali Assoumani assumed control. Pledging to abide by the OAU agreement and return the Comoros to civilian rule, he formed a transitional government. In a January 2000 referendum, residents of Nzwani voted overwhelmingly against signing the OAU agreement and rejoining the federation.