Canada has been inhabited for millennia by various Aboriginal peoples. Beginning in the 15th and 16th centuries, British and French claims were made on the area, with the colony of Canada first being established by the French in 1537. As a consequence of various conflicts, the United Kingdom gained and lost territories within British North America until it was left, in the late 18th century, with what mostly geographically comprises Canada today. Pursuant to the British North America Act, on July 1, 1867, the colonies of Canada, New Brunswick, and Nova Scotia joined to form the semi-autonomous federal Dominion of Canada. This began an accretion of provinces and territories to the mostly self-governing Dominion to the present ten provinces and three territories forming modern Canada.