Shocked by Canada's 1837 rebellions, John A. Macdonald sought to build alliances to avoid future conflicts. Thanks to financial worries and an alcohol problem, he almost quit politics in 1864. The challenge of building Confederation harnessed his skills, and in 1867 he became the country's first prime minister.