 British maritime flags were used by New Zealand vessels until 1865, with the passage of the "Colonial Naval Defence Act".After which, vessels of the New Zealand government used a defaced blue ensign issued by the colonial government.The current national flag of New Zealand was given official standing under the New Zealand Ensign Act in 1902, replacing the Union Flag.