The British Government appointed James Busby as British Resident to New Zealand in 1832 following a petition from northern Māori. His duties were to protect British commerce, mediate between the unruly Pākehā (European) settlers and Māori, and to apprehend escaped convicts. 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. In response to the New Zealand Company's attempts to establish an independent settlement in Wellington and French settlers purchasing land in Akaroa, Hobson declared British sovereignty over all of New Zealand on 21 May 1840, even though copies of the treaty were still circulating throughout the country for Māori to sign. With the signing of the treaty and declaration of sovereignty, the number of immigrants, particularly from the United Kingdom, began to increase.