Following the signing of the Treaty of Waitangi on 6 February 1840, the Union Jack replaced the flag of the United Tribes of New Zealand as the official flag of New Zealand. The new Lieutenant-Governor, William Hobson, removed the United Tribes flag from the Bay of Islands and had the New Zealand Company's version of the flag hauled down at Port Nicholson (Wellington).
Some Māori, including the Ngāpuhi chief Hōne Heke, believed that Māori should have the right to fly the United Tribes flag alongside the Union Jack, in recognition of their equal status with the government. Heke's repeated felling of the flagstaff at Kororāreka in 1844–45 was a vivid rejection of the Union Jack as a symbol of British power over Māori. The Ngāi Tahu chief Tūhawhaiki's hoisting of the United Tribes flag on the island of Ruapuke in Foveaux Strait in the 1840s also symbolised Māori independence.
The Union Jack was used on shore. At sea, New Zealand was represented by British naval or maritime flags until the United Kingdom’s Colonial Naval Defence Act became law in 1865. The Union Jack remained New Zealand's flag until the passage of the New Zealand Ensign Act instituted the current flag in 1902.
It continued to be used regularly in New Zealand well into the 1950s, instead of, or in tandem with the New Zealand flag. Today, the Union Jack is most commonly seen in New Zealand when a member of the royal family, or another distinguished British guest, is visiting.