The idea of a canal across the narrow isthmus of Panama, connecting the Atlantic and Pacific Oceans and eliminating the need for ships to travel around the entire southern tip of South America, had been discussed for centuries, but serious construction only began in 1881, led by a French company under Ferdinand de Lesseps, the engineer who had successfully built the Suez Canal. The Panama effort proved catastrophically more difficult than Suez: the region's dense tropical terrain, difficult geology, and — most devastatingly — diseases including yellow fever and malaria, whose transmission mechanism (mosquitoes) wasn't yet understood by medical science at the time, killed an estimated 22,000 or more workers over the project's roughly eight years, and the company collapsed into bankruptcy in 1889, a financial and engineering disaster of enormous scale.
The United States acquired the rights and assets of the failed French effort in the early 1900s, but only after a specific and controversial sequence of political maneuvering: when Colombia, which controlled Panama at the time, resisted the treaty terms the United States sought for canal rights, the US supported and provided naval assistance to a Panamanian independence movement in 1903, and the newly independent Panama's government promptly granted the United States the canal rights Colombia had declined to approve. American construction, beginning in 1904, succeeded partly through improved engineering (adopting a lock-based system rather than the French attempt's more difficult sea-level design) and, critically, through the application of newly understood mosquito-control sanitation measures, led by physician William Gorgas, that dramatically reduced disease deaths compared to the French effort. The canal opened in 1914, and transferred to full Panamanian control in 1999 under a treaty signed in 1977.