The history of Madagascar is distinguished clearly by the early isolation of the landmass from the ancient supercontinents containing Africa and India, and by the island's late colonization by human settlers arriving in outrigger canoes from the Sunda islands between 200 BC and 500 AD. These two factors facilitated the evolution and survival of thousands of endemic plant and animal species, some of which have gone extinct or are currently threatened with extinction due to the pressures of a growing human population. Over the past two thousand years the island has received waves of settlers of diverse origins including Austronesian, Bantu, Arab, South Asian, Chinese and European populations. The majority of the population of Madagascar today is a mixture of Austronesian, Bantu, North Indian, Arab and Somali settlers. Centuries of intermarriages created the Malagasy people, who primarily speak Malagasy, an Austronesian language with Bantu, Malay, Arabic, French and English influences. Most of the genetic makeup of the average Malagasy, however, reflects an almost equal blend of Austronesian and Bantu influences, especially in coastal regions. Other populations often intermixed with the existent population to a more limited degree or have sought to preserve a separate community from the majority Malagasy.
By the European Middle Ages, over a dozen predominant ethnic identities had emerged on the island, typified by rule under a local chieftain. Among some communities, such as the Sakalava, Merina and Betsimisaraka, leaders seized the opportunity to unite these disparate communities and establish true kingdoms under their rule. These kingdoms increased their wealth and power through exchanges with European, Arab and other seafaring traders, whether they were legitimate vessels or pirates. Between the 16th and 18th centuries, pirate activity in the coastal areas of Madagascar was common and the celebrated free pirate colony of Libertatia was established on le Sainte-Marie, originally populated by local Malagasy. The Sakalava and Merina kingdoms in particular exploited European trade to strengthen the power of their kingdoms, trading Malagasy slaves in exchange for European firearms and other goods. Throughout this time, European and Arab seafarers operating in the Indian Ocean traded with coastal communities, and Europeans made several unsuccessful attempts to claim and colonize the island. Beginning in the early 19th century, the British and French colonial empires competed for influence in Madagascar.