Canadian nationality law details the conditions by which a person is a national of Canada. The primary law governing these regulations is the Citizenship Act, which came into force on February 15, 1977 and is applicable to all provinces and territories of Canada. With few exceptions, almost all individuals born in the country are automatically citizens at birth. Foreign nationals may naturalize after living in Canada for at least three years while holding permanent residence and showing proficiency in the English or French language. Canada is composed of several former British colonies whose residents were British subjects. After Confederation into a Dominion within the British Empire in 1867, Canada was granted more autonomy over time and gradually became independent from the United Kingdom. Although Canadian citizens have no longer been British subjects since 1977, they continue to hold favoured status when residing in the UK. As Commonwealth citizens, Canadians are eligible to vote in UK elections and serve in public office there. History of Canadian nationality law and History of British nationality law British subject and History of Canada (1763–1867) European settlement of North America began with the arrival of the first colonists from England and France in the 16th century. The rival empires competed to expand their territorial control until British victory in the Seven Years' War and annexation of French Canada in 1763. Despite the loss of the Thirteen Colonies in 1783, British presence on the continent continued to expand through the 19th century, often in contest with the United States as the two powers raced to settle the Pacific Northwest. British nationality law applied to the North American colonies, as was the case elsewhere in the British Empire. Residents of these colonies and all other imperial citizens were British subjects; any person born in British North America, the United Kingdom, or anywhere else within Crown dominions was a natural-born British subject.