The history of Canada covers the period from the arrival of Paleo-Indians thousands of years ago to the present day. Canada has been inhabited for millennia by distinctive groups of Aboriginal peoples, with distinct trade networks, spiritual beliefs, and social hierarchies. Some of these civilizations had long faded by the time of the first European arrivals and have been discovered through archaeological investigations. Various treaties and laws have been enacted between European settlers and the Aboriginal populations.
Beginning in the late 15th century French and British expeditions explored, and later settled, along the Atlantic coast. France ceded nearly all of its colonies in North America to Britain in 1763 after the Seven Years' War. In 1867, with the union of three British North American colonies through Confederation, Canada was formed as a federal dominion of four provinces. This began an accretion of provinces and territories and a process of increasing autonomy from the British Empire, which became official with the Statute of Westminster of 1931 and completed in the Canada Act of 1982, which severed the vestiges of legal dependence on the British parliament.
Over centuries, elements of Aboriginal, French, British and more recent immigrant customs have combined to form a Canadian culture. Canadian culture has also been strongly influenced by that of its linguistic, geographic and economic neighbor, the United States. Since the conclusion of the Second World War, Canadians have supported multilateralism abroad and socioeconomic development domestically. Canada currently consists of ten provinces and three territories and is governed as a parliamentary democracy and a constitutional monarchy with Queen Elizabeth II as its head of state.
In 1866, the Colony of British Columbia and the Colony of Vancouver Island merged into a single Colony of British Columbia, until their incorporation into the Canadian Confederation in 1871. In 1873, Prince Edward Island, the Maritime colony that had opted not to join Confederation in 1867, was admitted into the country. That year, John A. Macdonald (First Prime Minister of Canada) created the North-West Mounted Police (now the Royal Canadian Mounted Police) to help police the Northwest Territories. Specifically the Mounties were to assert Canadian sovereignty over possible American encroachments into the sparsely populated land.
The Mounties' first large-scale mission was to suppress the second independence movement by Manitoba's Métis, a mixed blood people of joint First Nations and European descent, who originated in the mid-17th century. The desire for independence erupted in the Red River Rebellion in 1869 and the later North-West Rebellion in 1885 led by Louis Riel. In 1905 when Saskatchewan and Alberta were admitted as provinces, they were growing rapidly thanks to abundant wheat crops that attracted immigration to the plains by Ukrainians and Northern and Central Europeans and by settlers from the United States, Britain and eastern Canada.
The Alaska boundary dispute, simmering since the Alaska purchase of 1867, became critical when gold was discovered in the Yukon during the late 1890s, with the U.S. controlling all the possible ports of entry. Canada argued its boundary included the port of Skagway. The dispute went to arbitration in 1903, but the British delegate sided with the Americans, angering Canadians who felt the British had betrayed Canadian interests to curry favor with the U.S.
In 1893, legal experts codified a framework of civil and criminal law, culminating in the Criminal Code of Canada. This solidified the liberal ideal of "equality before the law" in a way that made an abstract principle into a tangible reality for every adult Canadian. Wilfrid Laurier who served 1896–1911 as the Seventh Prime Minister of Canada felt Canada was on the verge of becoming a world power, and declared that the 20th century would "belong to Canada".
Laurier signed a reciprocity treaty with the U.S. that would lower tariffs in both directions. Conservatives under Robert Borden denounced it, saying it would integrate Canada's economy into that of the U.S. and loosen ties with Britain. The Conservative party won the Canadian federal election, 1911.
In 1921 to 1926, William Lyon Mackenzie King's Liberal government pursued a conservative domestic policy with the object of lowering wartime taxes and, especially, cooling wartime ethnic tensions, as well as defusing postwar labour conflicts. The Progressives refused to join the government, but did help the Liberals defeat non-confidence motions. King faced a delicate balancing act of reducing tariffs enough to please the Prairie-based Progressives, but not too much to alienate his vital support in industrial Ontario and Quebec, which needed tariffs to compete with American imports. King and Conservative leader Arthur Meighen sparred constantly and bitterly in Commons debates. The Progressives gradually weakened. Their effective and passionate leader, Thomas Crerar, resigned to return to his grain business, and was replaced by the more placid Robert Forke. The socialist reformer J.S. Woodsworth gradually gained influence and power among the Progressives, and he reached an accommodation with King on policy matters.
In 1926 Prime Minister Mackenzie King advised the Governor General, Lord Byng, to dissolve Parliament and call another election, but Byng refused, the only time that the Governor General has exercised such a power. Instead Byng called upon Meighen, the Conservative Party leader, to form a government.  Meighen attempted to do so, but was unable to obtain a majority in the Commons and he, too, advised dissolution, which this time was accepted. The episode, the King-Byng Affair, marks a constitutional crisis that was resolved by a new tradition of complete non-interference in Canadian political affairs on the part of the British government.