The United States wanted to build the Panama Canal to shorten the ocean journey from the East Coast to the West Coast. Instead of making the long voyage around the southern tip of South America, ships could make the trip in less than half the time. The discovery of gold in California in 1848 spurred interest in creating a shorter link between the Atlantic and Pacific Oceans. The Panama Railway, which opened in 1855, first bridged the gap, but politicians, businessmen and military personnel all saw an all-water passage as the ideal solution. Early plans suggested a route through Nicaragua, but President Roosevelt and the U.S. Senate abandoned this option in favor of Panama. The French were the first to attempt the canal-building in Panama. From 1881 to 1884, French construction crews labored with heavy equipment over mountains and through jungles and swamps. They had to put up with not only the difficult terrain, but also ubiquitous mosquitoes carrying malaria and yellow fever. Failing in their attempt, the French sold the equipment and rights to the canal to the Americans. Panama was then part of Colombia. When Roosevelt's government had difficulty negotiating a treaty with the Colombians, the U.S. allied with some Panamanian businessmen and arranged a revolution. Within a few days, Panama declared its independence, and within a few months, it signed a treaty with the United States for the construction of the canal. The construction took 10 years, from 1904 to 1914.