Russia had established a presence in North America during the first half of the 18th century, but few Russians ever settled in Alaska. In the aftermath of the Crimean War, Russian Tzar Alexander II began exploring the possibility of selling Alaska, which would be difficult to defend in any future war from being conquered by Russia's main archrival, the United Kingdom. Following the end of the American Civil War, U.S. Secretary of State William Seward entered into negotiations with Russian minister Eduard de Stoeckl for the purchase of Alaska. Seward and Stoeckl agreed to a treaty on March 30, 1867, and the treaty was ratified by the United States Senate by a wide margin.