New Zealand is one of the last major landmasses settled by humans. Radiocarbon dating, evidence of deforestation and mitochondrial DNA variability within Māori populations suggest that Eastern Polynesians first settled the New Zealand archipelago between 1250 and 1300, although newer archaeological and genetic research points to a date no earlier than about 1280, with at least the main settlement period between about 1320 and 1350, consistent with evidence based on genealogical traditions. This represented a culmination in a long series of voyages through the Pacific islands. Over the centuries that followed, the Polynesian settlers developed a distinct culture now known as Māori. The population formed different iwi (tribes) and hapū (subtribes) which would sometimes cooperate, sometimes compete and sometimes fight against each other. At some point, a group of Māori migrated to Rēkohu, now known as the Chatham Islands, where they developed their distinct Moriori culture. The Moriori population was all but wiped out between 1835 and 1862, largely because of Taranaki Māori invasion and enslavement in the 1830s, although European diseases also contributed. In 1862 only 101 survived, and the last known full-blooded Moriori died in 1933.
In a hostile 1642 encounter, four of Dutch explorer Abel Tasman’s crew members were killed, and at least one Māori was hit by canister shot. Europeans did not revisit New Zealand until 1769 when British explorer James Cook mapped almost the entire coastline.
Following Cook, New Zealand was visited by numerous European and North American whaling, sealing and trading ships. They traded European food, metal tools, weapons and other goods for timber, Māori food, artefacts and water. The introduction of the potato and the musket transformed Māori agriculture and warfare. Potatoes provided a reliable food surplus, which enabled longer and more sustained military campaigns. The resulting intertribal Musket Wars encompassed over 600 battles between 1801 and 1840, killing 30,000–40,000 Māori. From the early 19th century, Christian missionaries began to settle New Zealand, eventually converting most of the Māori population. The Māori population declined to around 40% of its pre-contact level during the 19th century; introduced diseases were the major factor.
In 1788 Captain Arthur Phillip assumed the position of Governor of the new British colony of New South Wales which according to his commission included New Zealand. The British Government appointed James Busby as British Resident to New Zealand in 1832 following a petition from northern Māori. In 1835, following an announcement of impending French settlement by Charles de Thierry, the nebulous United Tribes of New Zealand sent a Declaration of Independence to King William IV of the United Kingdom asking for protection. Ongoing unrest, the proposed settlement of New Zealand by the New Zealand Company (which had already sent its first ship of surveyors to buy land from Māori) and the dubious legal standing of the Declaration of Independence prompted the Colonial Office to send Captain William Hobson to claim sovereignty for the United Kingdom and negotiate a treaty with the Māori. The Treaty of Waitangi was first signed in the Bay of Islands on 6 February 1840.