Building an interoceanic canal was suggested early in Spanish colonial times. The United States, interested since the late 18th cent. in trading voyages to the coast of the Pacific Northwest, became greatly concerned with plans for a canal after settlers had begun to pour into Oregon and California. Active negotiations led in 1846 to a treaty, by which the republic of New Granada (consisting of present-day Panama and Colombia) granted the United States transit rights across the Isthmus of Panama in return for a guarantee of the neutrality and sovereignty of New Granada.
The isthmus gained more importance after the United States acquired (1848) California and the gold rush began, and the trans-Panama RR was built (1848–55) with U.S. capital. At the same time, interest in an alternate route, the Nicaragua Canal, was strong in both Great Britain and the United States. Rivalry between the two countries was ended by the Clayton-Bulwer Treaty (1850), which guaranteed that neither power should have exclusive rights or threaten the neutrality of an interoceanic route. In the 1870s and 80s the United States tried unsuccessfully to induce Great Britain to abrogate or amend the Clayton-Bulwer Treaty.
After the United States acquired territory in the Caribbean and in the Pacific as a result of the Spanish-American War (1899), U.S. control over an isthmian canal seemed imperative. Following protracted negotiations, a U.S.-British agreement (see Hay-Pauncefote Treaties) was made in 1901, giving the United States the right to build, and by implication fortify, an isthmian canal. It was then necessary for Congress to choose between Nicaragua or Panama as the route for the canal.