The Thames Barrier has been in record use over the past two months. How does it work?

A map released by its operator, the Environment Agency, in December showed how London would look if sea levels continued to rise and there was no barrier. The Houses of Parliament, the O2 arena, Tower Bridge, and areas including Southwark, the Isle of Dogs, Whitechapel and West Ham were shown to be flooded.

The barrier, built in 1982 on the Thames on the eastern side of the capital at Woolwich, was designed to protect 48 sq miles (125 sq km) of central London from flooding caused by tidal surges.

Image copyright Environment Agency Image caption How London might be affected by flooding from the sea without the Thames Barrier

At the moment, with so much rainfall travelling down the Thames, there is a danger during high tide that the extra water will be pushed back up river by the sea and cause flooding in the capital and to the west.

To prevent this, the barrier has been used at record levels, says Eamonn Forde, one of its controllers. It has closed 28 times since 6 December. This represents one fifth of all the closures - about 150 - since it was inaugurated.

Some years it hasn't been used at all. When it shut in December 2012, it was reported to be the first closure since March 2010.

The barrier, made up of 10 steel gates, reaches 520m (1,700ft) across the river. When open, the gates lie flat on the river floor and close by being rotated upwards until they block the river. The four main gates span 61.5m (200ft) and weigh more than 3,000 tonnes each. The barrier is closed just after low tide to create an empty "reservoir" for the river flow to fill up. It takes 75-90 minutes to close it, starting with the gates on the outside until the middle gates are shut.

Open - Allows the Thames to flow freely and ships to pass through the gates

- Allows the Thames to flow freely and ships to pass through the gates Closed - Creates a solid steel wall preventing water flowing upstream towards the capital

- Creates a solid steel wall preventing water flowing upstream towards the capital Underspill position - Allows a controlled amount of water to pass under the gate and up the Thames

With no barrier, at high tide, the sea would normally flow up the estuary and into London, pushing the river water back. With all the extra rainfall, this could worsen the flooding. The barrier prevents this from happening. The gates are left shut and the river water is held until the tide turns. Staff wait for the water on both sides to "equalise" - reach the same level - and then the gate is opened and the river water can rush out into the estuary.

There is no danger that the water will overwhelm the barrier. "We've got a massive amount of room."

Oosterscheldekering Image copyright Getty Images Largest tidal surge barrier in the world, situated between Dutch islands of Schouwen-Duiveland and Noord-Beveland

One of 13 barriers in the Delta network, built to protect the Netherlands from flooding, it was opened in 1986 by Queen Beatrix

Designed to last 200 years; the plaque on the barrier bears the inscription: "Here the tide is ruled, by the wind, the moon and us"

Storm surge from the North Sea, high tides and exceptional fluvial (river) flow are the three factors that make it necessary. At the moment the major factor is the amount of water flowing down the Thames. "We're predominantly closing to help reduce levels the other side of Teddington Weir," Forde says.

How much difference is the barrier making?

"We're reducing the level by inches," he says. That impact is felt up the Thames as far as Molesey - about 12 miles from central London. That is where the effect of the tide runs out. Inches may not sound a lot but it could be the difference between ground level and someone's house, Forde says.

The barrier was closed at 10:30 GMT on Tuesday, for instance. It was to open later when the tide turned. Forde expects it to close again on Wednesday. The forecasts for the staff at the barrier - they have weather and storm measuring systems based in the North Sea - show deteriorating weather. A spring (higher) tide is also beginning on Wednesday.

For most of its history, London lacked such protection. In 1928, 14 people drowned when a swollen Thames overflowed between the City and Southwark to the east and Putney and Hammersmith to the west. According to contemporary reports, the streets were filled with water up to 4ft (1.2m) deep.

Image copyright Getty Images Image caption 1928: The last time the Thames flooded the streets of London

The 1953 North Sea flood, which resulted in one London death and flooding at Silvertown, in the east, prompted calls for a mechanism to protect the capital. Construction on the Thames Barrier began in 1974 and it was officially opened a decade later.

The barrier was originally designed to last up to the year 2030. Recent analysis suggests that even with sea level rise from anticipated climate change the barrier will be sufficient protection until 2060-70.

Follow @BBCNewsMagazine on Twitter and on Facebook