From Confederation in 1867 to 1939, Canada transformed from a fledgling nation into an autonomous country, while facing significant challenges. Canada was created with the union of Ontario, Quebec, New Brunswick, and Nova Scotia, and quickly expanded westward. The completion of the Canadian Pacific Railway in 1885 fueled settlement and growth, though it sparked conflicts like the Northwest Rebellion led by Louis Riel. Canada’s identity strengthened during World War I, particularly with the victory at Vimy Ridge in 1917, but conscription deeply divided English and French Canadians. Post-war, Canada gained greater independence through the Statute of Westminster in 1931, securing control over its foreign affairs. The Great Depression in the 1930s brought economic hardship, leading to political upheaval and the rise of new movements like the CCF. By 1939, Canada had developed a stronger national identity but remained divided as it prepared for World War II.