The most notable of these early immigrants were the Shirazi Arab royal clans, who arrived in Comoros in the 15th and 16th centuries and stayed to build mosques, create a royal house and introduce architecture and carpentry.
Over the centuries, the Comoro Islands were invaded by a succession of diverse groups from the coast of Africa, the Persian Gulf, Indonesia, and Madagascar. Portuguese explorers visited the archipelago in 1505.
In 1529 the French Parmentier brothers came, but the first reliable European accounts of this part of the world came from the Portuguese explorers, Diogo Dias and Fernando Soares. The Portuguese failed to capitalise on being the first Europeans to reach the islands, and for the next century or two the islands were used only on voyages up and down the coast of East Africa. In fact, up until the middle of the 19th century, it was not European explorers but pirates from Madagascar who had the largest impact. During this time the fragmentation of power led to the creation of many statelets, each controlled by a sultan and at one stage there were no fewer than 12 sultans on the island of Grande Comore alone.
The French turned their attention to the Comoros islands in the middle of the 19th century. The French finally acquired the islands through a cunning mixture of strategies, including the policy of 'divide and conquer', chequebook politics and a serendipitous affair between a sultana and a French trader that was put to good use by the French, who kept control of the islands, quelling unrest and the occasional uprising.
For the history of the native sultanates on several of the major islands, see Sultans on the Comoros.
On 25 March 1841, France annexed the Mawuti Maore sultanate (the name of the island was corrupted in French to "Mayotte") as Mayotte protectorate (ratified 13 June 1843). In 1852, Andruna is added to Mayotte protectorate and, in 1866, the large sultanate Ndzuwani (on Anjouan island) as well.
On 24 June 1886, the islands of Ngazidja (Grande Comore in French) comprised eleven sultanates, but, in 1886, the Sultan tibe (paramount ruler and Sultan) of Bambao unified them, Ndzuwani (Anjouan), and Mwali sultanate (Mohéli island in French) become French protectorates, French résidents are posted on the three islands; on 5 September 1887 they are collectively renamed Protectorate of the Comoros.
On 9 April 1908, France declared the Comoros a dependent territory of its Madagascar colony. On 25 July 1912, it was annexed by France and joined with Mayotte as Mayotte and dependencies, after the ratification on 23 February 1914 subordinated to the governor general of Madagascar (Comoros dependent colony).
From 16 June 1940 - 1942 the colonial administration remained loyal to Vichy France (from 1942, under Free French), but 25 September 1942 - 13 October 1946 they were, like Madagascar, under British occupation.
Independence came gradually for Comoros. During the middle of the 20th century the French reluctantly began to accede to reasonable requests, and by 1947 Comoros had become a separately administered colony from Madagascar.
After World War II, the islands became a French overseas territory and were represented in France's National Assembly. Internal political autonomy was granted in 1961. Agreement was reached with France in 1973 for Comoros to become independent in 1978. On July 6, 1975, however, the Comorian parliament passed a resolution declaring unilateral independence. The deputies of Mayotte abstained.
In two referendums, in December 1974 and February 1976, the population of Mayotte voted against independence from France (by 63.8% and 99.4% respectively). Mayotte thus remains under French administration, and the Comorian Government has effective control over only Grande Comore, Anjouan, and Mohéli.
In 1961 it was granted autonomous rule and, seven years after the general unrest and left-wing riots of 1968. Comoros broke all ties with France and established itself as an independent republic. From the very beginning Mayotte refused to join the new republic and aligned itself even more firmly to the French Republic, but the other islands remained committed to independence. The first president of Comoros, Ahmed Abdallah Abderemane, did not last long before being ousted in a coup by Ali Solih, an atheist with an Islamic background.
Solih began with a set of solid socialist ideals designed to modernize the country. However, the regime faced problems. A French mercenary by the name of Bob Denard, arrived in Comoros at dawn on 13 May 1978, and removed Solih from power. Solih was shot and killed during the coup. Abdallah returned to govern the country and the mercenaries were given key positions in government.
Later, French settlers, French-owned companies, and Arab merchants established a plantation-based economy that now uses about one-third of the land for export crops.
When in 1981 François Mitterrand was elected president Denard lost the support of the French intelligence service, but he managed to strengthen the link between SA and the Comoros. Besides the military, Denard established his own company SOGECOM, for both the security and construction, and seemed to profit by the arrangement. Between 1985 an 1987 the relationship of the PG with the local Comorians became worse.
At the end of the 1980s the South Africans did not wish to continue to support the mercenary regime and France was in agreement. Also President Abdallah wanted the mercenaries to leave. Their response was a (third) coup resulting in the death of President Abdallah, in which Denard and his men were probably involved. South Africa and the French government subsequently forced Denard and his mercenaries to leave the islands in 1989.
On September 28, 1995 Bob Denard and a group of mercenaries took over the Comoros islands in a coup (named operation Kaskari by the mercenaries) against President Djohar. France immediately severely denounced the coup, and backed by the 1978 defense agreement with the Comoros, President Jacques Chirac ordered his special forces to retake the island. Bob Denard began to take measures to stop the coming invasion. A new presidential guard was created. Strong points armed with heavy machine guns were set up around the island, particularly around the island's two airports.
On October 3, 1995, 11 p.m., the French deployed 600 men against a force of 33 mercenaries and a 300 man dissident force. Denard however ordered his mercenaries not to fight. Within 7 hours the airports at Iconi and Hahaya and the French Embassy in Moroni were secured. By 3:00 p.m. the next day Bob Denard and his mercenaries had surrendered. This (response) operation, codenamed Azalée, was remarkable, because there were no casualties, and just in seven days, plans were drawn up and soldiers were deployed. Denard was taken to France and jailed. Prime minister Caambi El-Yachourtu became acting president until Djohar returned from exile in January, 1996. In March 1996, following presidential elections, Mohamed Taki Abdoulkarim, a member of the civilian government that Denard had tried to set up in October 1995, became president.
In May 2006, Ahmed Abdallah Sambi was elected from the island of Anjouan to be the president of the Union of Comoros. He is a well-respected Sunni cleric who studied in the Sudan, Iran and Saudi Arabia. He is respectfully called "Ayatollah" by his supporters but is considered, and is, a moderate Islamist. He has been quoted as stating that Comoros is not ready to become an Islamic state, nor shall the veil be forced upon any women in the Comoros..