One of the main reasons why the second attempt to build the canal succeeded was that a doctor named William Gorgas with the American team had heard a theory that malaria and yellow fever might be spread by mosquitoes. At that time, people did not believe that very new theory. People thought that malaria and yellow fever were caused by bad air.
When Gorgas proposed trying to control the diseases by controlling mosquitoes, some of his supervisors thought his idea was crazy and a big waste of time and money. However Gorgas persisted in fighting for his proposal, and after two years of extensive work, succeeded in controlling these deadly diseases by controlling mosquitoes. Nevertheless, even with all this effort, about 5,600 workers died of accidents during the U.S. construction of the canal.
The canal was formally opened on August 15, 1914. It was operated by U.S. under treaties and agreements with Panama until 1999. On December 31, 1999 a new treaty turned full control of the canal over to Panama.