Although there is proof that the ancient Egytians had originally built various water channels between the Mediterranean Sea and the Red Sea, it wasn't until the second half the 1800's that the sea level Suez Canal was built.
Led by the Frenchman, Ferdinand de Lesseps, the initial construction of the Suez Canal was completed on November, 1869. At the beginning there was controversy, for a variety of reasons, including slavery and the deaths of thousands of laborers, but eventually the Suez Canal became a successful venture.
Based on the profitability of the Suez project, de Felleps led to the construction of the Panama Canal. His plan was to also build a sea level canal through the isthmus of Panama.
After a few years of construction, the French project was abandoned. There are a variety of reasons for the eventual bankruptcy, but tropical diseases among the workers and a failure to utilize a lock mechanism are the main reasons cited.
To accommodate the human traffic, as a consequence of the 1848 California gold rush, a railway, across the isthmus of Panama was built by the Americans. Later, at the beginning of the 20th century, under the guise of of "protecting American interests from Revolutionary forces" the American government stealthily acquired the Canal Zone and thus allowing the Americans to build a channel to connect the Pacific and Atlantic oceans.
The success of building a canal was not wishing to repeat the mistake of the French. An infrastructure was first placed to control tropical diseases and then the construction of lock building began. The Panama Canal was opened at the start of World War one.
A trick question is "what direction are you traveling, when on the Panama Canal, from the Atlantic to Pacific?". The correct answer is "East". A look on a map will show because of the curvature of Panama, the correct answer is a bit contrary.