annexation of Texas. Britain tried without success to moderate the Mexicans, but when the war began it remained neutral. The US gained California, in which the British had shown only passing interest. Nicaraguan canal The discovery of gold in California in 1848 brought a heavy demand for passage to the gold fields, with the main routes crossing disease-ridden Panama to avoid a very long slow sailing voyage around all of South America. A railroad was built that carried 600,000 passengers but the disease threat remained. A canal in Nicaragua was a much more healthy and attractive possibility, and American businessmen gained the necessary permissions, along with a US treaty with Nicaragua. However the British were determined to block an American canal, and seized key locations on the Mosquito Coast on the Atlantic that blocked it. The Whig Party was in charge in Washington and unlike the bellicose Democrats wanted a businesslike peaceful solution. The United States decided that a canal should be open and neutral to all the world's traffic, and not be militarized. Tensions escalated locally, with small-scale physical confrontations in the field. Washington and London found a diplomatic solution. The Clayton–Bulwer Treaty of 1850 guaranteed equal canal rights to both the US and Britain. Each agreed not to colonize Central America. However, no Nicaragua canal was ever started. By the late 1890s Britain saw the need for much improved relations with the United States, and agreed to allow the US to build a canal through either Nicaragua or Panama. The choice was Panama. The Hay–Pauncefote Treaty of 1901 replaced the Clayton–Bulwer Treaty, and adopted the rule of neutralization for the Panama Canal which the US built; it opened in 1914. American Civil War In the American Civil War a major Confederate goal was to win recognition from Britain and France, which it expected would lead them to war with the US and enable the Confederacy to win independence. Because of astute American diplomacy, no nation ever recognised the Confederacy and war with Britain was averted. Nevertheless, there was considerable British sentiment in favour of weakening the US by helping the South win. At the beginning of the war Britain issued a proclamation of neutrality. The Confederate States of America had assumed all along that Britain would surely enter the war to protect its vital supply of cotton. This "King Cotton" argument was one reason the Confederates felt confident