The men who dug the Panama Canal in a climate of heat and wet that brought thousands down with malaria or yellow fever – until the chief medical officer came up with a radical solution. Photograph: Underwood & Underwood/Corbis

Next year is the 100th anniversary of the opening of the Panama Canal, which revolutionised trade between the Pacific and Atlantic, saving about 8,000 miles from journeys around Cape Horn in South America. It was also one of the greatest engineering feats in the world, in which the Americans built the canal over the hills of Panama in a series of great locks, a system that relies entirely on rain.

Around 52 million gallons of fresh water is lost to the sea each time a ship enters or leaves the canal. That water is replaced from a vast reservoir built high in the hills, which in turn is replenished by heavy rainfall – but if the rains dry up so does the canal, and in 1997-98 the canal experienced its worst recorded drought that restricted shipping.

The weather was also a constant threat during the 10 years of the canal’s construction. Heavy rains set off countless landslides in the hillsides, and the heat and wet climate brought yellow fever and malaria. By 1906, more than 85 per cent of the canal workers were infected and the canal was close to being abandoned.

The project was only saved by the chief medical officer, William Gorgas, who believed that mosquitoes carried the diseases, a radical idea at the time. A team of 4,000 men drained or fumigated all stagnant water to prevent the mosquitoes from breeding, and as a result the death toll was slashed and the canal completed.