Image copyright Getty Images Image caption Assessing the social and environmental effects of large-scale dams is complicated

Not far from Cairo stood a remarkable dam, the Sadd el-Kafara, more than 100m long, and 14m high, and able to store about half a million cubic metres of water.

These statistics are modest, by modern standards - but the Sadd el-Kafara is not a modern dam. It was built nearly 5,000 years ago.

And it was a spectacular failure: archaeologists believe the dam burst almost immediately.

Image copyright Jean-Luc Frerotte Image caption The remains of the right bank of the Sadd el-Kafara dam, photographed in 2008

One cannot fault the ancient Egyptians for trying.

Water was scarce, and rainfall uneven. A sudden storm would have delivered a valuable resource, free of charge, literally falling from the sky. A dam would have allowed water to be stored until needed.

Ancient Egypt isn't the only place to have found itself trying to deal with uneven rainfall.

Much of the world's population lives in places where the availability of water is seasonal, or - increasingly - unpredictable. The plentiful, year-round water we have come to expect in developed countries often relies on a system of dams and reservoirs.

Where such a system is lacking, the effects can be brutal: Kenya lost more than 10 per cent of its economic output to drought in the late 1990s, followed by an even larger economic loss because of flooding.

With dams offering the potential to manage both droughts and floods, small wonder they have been tempting projects for millennia.

50 Things That Made the Modern Economy highlights the inventions, ideas and innovations that helped create the economic world.

It is broadcast on the BBC World Service. You can find more information about the programme's sources and listen to all the episodes online or subscribe to the programme podcast.

As a bonus, dams can include hydroelectric power stations. Given hydroelectricity is a bigger energy source than nuclear, solar, wind or tidal, what's not to like?

The citizens of Henan province in central China could tell you.

They live downstream of the Banqiao dam, which was built in the 1950s, and immediately showed signs of cracking. After reinforcement it was dubbed "the Iron Dam" and declared unbreakable. In August 1975, it broke.

Locals described the event as "the coming of the river dragon"; a wave several metres high and, eventually, 12km wide. Tens of thousands of people died - some estimates suggest almost a quarter of a million. The tragedy was a state secret in China for many years.

Nevertheless, it did not stop the Chinese government from deciding to replace the dam. The Banqiao disaster was notable only because of its size: 3,000 other dams failed in communist China between 1949 and 1980.

Even in wealthy countries, dams have been responsible for some of the deadliest man-made disasters.

Large reservoirs can weigh more than 100,000 million tonnes when full - enough to cause earthquakes - and much smaller ones can still cause deadly landslides.

The Malpasset dam in France cracked in 1959 when the land at one edge of the curved concrete shell slipped under the pressure of the water, and 423 people died.

Image copyright Getty Images Image caption French politicians pay respect to some of the victims of the Malpasset Dam collapse

Four years later, the new Vaiont dam in Italy was overwhelmed by an inland tsunami when the weight of its slowly-filling reservoir caused a landslide. Nearly 2,000 people were killed.

Dams were also military targets during World War Two and the Korean war. And a dam does not even have to be destroyed to be a weapon.

The Itaipu dam, on the border of Brazil and Paraguay, lies upstream of Argentina's capital, Buenos Aires. If the sluice gates were all opened at once, the city would be flooded.

Yet it is not the risk of catastrophe that gives the modern dam its uneasy reputation: it is the harm done as the dam reshapes the ecosystem both up and downstream.

The poster-child for this harm has long been the High Aswan dam in Egypt, which holds back the river Nile, creating a 500km-long reservoir.

Image copyright Getty Images Image caption Lake Nasser, the reservoir created by the High Aswan Dam, is one of the largest man-made lakes in the world

The Economist magazine gives a checklist of the consequences: "An explosion of water hyacinth, outbreaks of bilharzia [an infection caused by a parasitic worm that lives in fresh water], polluted irrigation channels and a build-up of sediment inland that would otherwise compensate for coastal erosion from Egypt to Lebanon."

That doesn't even mention the fact that dozens of ancient Nubian temples were flooded, or moved in their entirety, as a result of the construction.

Image copyright Alamy Image caption The colossal statues of Ramesses II were some of the many monuments moved as a result of the High Aswan Dam's construction

And it wasn't just the temples that were displaced: more than 100,000 people were forced to move.

But some experts argue that despite all the costs, the project has been an overwhelming success.

The High Aswan allows predictable irrigation. It paid for itself within two years, and shielded Egypt from what would have been a disastrous drought throughout the 1980s, followed by potentially catastrophic floods in 1988.

All dams create winners and losers - and tensions that need to be managed.

More things that made the modern economy:

The only two women to win the Nobel memorial prize in economics both studied the effects of dams.

Elinor Ostrom showed how dams in Nepal destabilised traditional arrangements between upstream and downstream communities about sharing water.

Esther Duflo found that large dams in India benefited some communities through irrigation, but increased poverty in others.

Given the scale of these projects, the losers from dams often live in other countries, meaning the tensions can resonate across international borders.

The latest example of this is the Ethiopian Renaissance Dam, which will be Africa's largest hydroelectric project when completed in 2022.

Image copyright Reuters Image caption Ethiopia's Grand Renaissance Dam under construction on the river Nile

It sits upstream from the High Aswan and has the potential to restrict the flow of the Nile towards Egypt, which is not happy.

But compensating the losers is not always a priority for politicians, who are often more interested in the symbolism. You can see why.

From the early Soviet Union's Dneprostroi to modern China's Three Gorges dam - which vies with the Itaipu for the title of the world's largest power station - political leaders have wanted successful dams to stand as testament to their grand, strategic vision.

Image copyright Getty Images Image caption China's Three Gorges dam project submerged 13 cities, 140 towns and 1,350 villages

Some believe the enduring bad reputation of the High Aswan dates from Cold War propaganda.

When Egypt's President Nasser couldn't get backing for the dam from the United States, he turned to the Soviet Union, and nationalised the Suez Canal to help pay for it. That led to the Suez crisis.

No wonder western leaders didn't want Nasser to get a public relations boost.

Dams reshape economies in complex ways. Many may be worth it overall only if the benefits can be equitably shared with those who lose out. But this messy reality is easy to overlook when dams are seen as symbols of national virility.

When India's first Prime Minister, Jawaharlal Nehru, spoke to villagers displaced by the colossal Hirakud Dam project in 1948, he may have spoken more plainly than he intended: "If you are to suffer, you should suffer in the interest of the country."

It is not clear that anyone found that comforting.

The author writes the Financial Times's Undercover Economist column. 50 Things That Made the Modern Economy is broadcast on the BBC World Service. You can find more information about the programme's sources and listen to all the episodes online or subscribe to the programme podcast.