The colony of New South Wales encompasses New Zealand from 1788 to 1840. Therefore the head of state is the monarch of the United Kingdom represented by the Governor of New South Wales. However, British sovereignty was not established over New Zealand per se until 1840, at which point the Treaty of Waitangi retroactively recognised that it had been an independent territory until then. Furthermore, the Declaration of the Independence of New Zealand signed by a number of Maori chiefs in 1835 was formally recognised by the British government at the time, indicating that British sovereignty did not yet extend to New Zealand. (New Zealand Ministry of Culture and Heritage)