a significant number of Samoans already living in New Zealand to become illegal immigrants. In 1982, the Judicial Committee of the Privy Council ruled that all Western Samoans born between 1928 and 1948 were British subjects and automatically became New Zealand citizens in 1949. This decision would have granted New Zealand citizenship for an estimated 100,000 Samoans, out of a total population of 160,000 at the time. Faced with the prospect of a potential brain drain if large numbers of its people exercised their newfound dual citizenship rights, Western Samoa signed the Protocol to the Treaty of Friendship with New Zealand on 21 August 1982. This treaty, and the subsequent Citizenship (Western Samoa) Act 1982, effectively nullified the Privy Council ruling. This Act affirmed citizenship for Samoans who were already present in New Zealand before 15 September 1982, but required that those who enter the country after that date must first become permanent residents before acquiring citizenship. The Cook Islands became a self-governing state in free association with New Zealand in 1965, and Niue gained independence under largely the same terms in 1974. New Zealand retained responsibility for defence and foreign affairs for the two nations and residents of both states remain New Zealand citizens. Acquisition and loss of citizenship Nationality regulations apply to the entire Realm of New Zealand, which includes New Zealand itself, the Cook Islands, Niue, Tokelau, and the Ross Dependency. New Zealand airspace, its internal and territorial waters, and New Zealand-registered ships and aircraft are treated as part of the Realm for nationality purposes. All persons born within the Realm before 2006 automatically received citizenship at birth regardless of the nationalities of their parents. Individuals born in the Realm from that year on receive New Zealand citizenship at birth if at least one parent is a New Zealand citizen or otherwise entitled to be in New Zealand indefinitely. Children born overseas are New Zealand citizens by descent if either parent is a citizen otherwise than by descent. Adopted children are treated as if they were naturally born to the adopting parents at the time of adoption. Foreigners over the age of 16 may become New Zealand citizens by grant after residing in the Realm for more than five years while possessing indefinite permission to remain. This usually means holding New Zealand permanent residency, but Australian citizens and permanent residents also have an indefinite permission to remain.