The Panama Canal: Connecting two oceans
American interest in linking the Atlantic and Pacific oceans by means of a canal across Central America had existed for many years. With the signing of the Clayton-Bulwer Treaty, the U.S. and Britain agreed not to act unilaterally on such a project, but by the end of the century the dynamics had changed. The United States had emerged as a world power following the Spanish-American War.
Experiences during the conflict had underlined the need for more rapid deployment of the fleet. More than two months were required to sail from California to New York by way of Cape Horn. Completion of a canal would reduce that voyage by 8,000 miles.
France had begun a canal project in the Panama region of Colombia during the 1880s, but progress was brought to a halt by tropical diseases, engineering problems and a dwindling treasury. The French effort, headed by Ferdinand DeLesseps—engineer for the Suez Canal—declared bankruptcy and was taken over by a group whose sole intention was to sell the defunct company’s assets to the United States.
https://www.u-s-history.com/pages/h932.html