Media playback is unsupported on your device Media caption The sand barrier will stretch for 6km (3.7 miles) along the Norfolk coast

Nearly two million cubic metres of sand are being shifted to a stretch of eroding Norfolk coastline in a radical plan to save it from the sea.

The 6km-long dune will protect Bacton Terminal, which supplies one third of the UK's gas, but is teetering just metres from a cliff edge.

The £20m project should also act as a defence for two nearby villages - Bacton and Walcott.

It is the first "sandscaping" scheme on this scale to be carried out in the UK.

It has been designed by Dutch engineering company Royal HaskoningDHV.

Once the sand has been shifted, a combination of wind, waves and tides will "move the sands to where it needs to be," said the firm's coastal management adviser Jaap Flikweert. This will "provide 15-20 years of protection".

Image caption A dredger filled with sand connects to the shore with a long pipe

The scheme has just started, and it is expected to take about five weeks to get all of the sand into place.

In a 24-hour operation, carried out by the Dutch maritime company Van Oord, a dredging vessel is collecting the sand from further along the coast at a licensed site where sediment is currently extracted for concrete.

It then sails to Bacton, connects to a giant pipe, and pumps a mixture of sand and water onto the shore at a rate of 10,000 cubic metres per hour. Bulldozers and diggers then shift the sand into place.

Once complete, the dune will stretch for 6km (4 miles). At its highest point, it will stand 7m-high (22ft) and extend up to 250m (820ft) out to sea.

"It will turn back the clock to what the beach was like about 30 years ago," says Mr Flikweert.

Image caption Bacton Gas Terminal is getting ever closer to the cliff edge as the coast recedes

The Norfolk coastline is losing land every year as part of natural geological erosion. When big storms occur, several metres of coastline can vanish at once.

Homes in villages like Happisburgh have already started to be lost to the sea - and many other coastal communities are facing a similar fate.

When Bacton Gas Terminal was built in the 1960s, it was situated more than 100m back from the sea. Now some parts of the complex are just 10m from a cliff edge.

Typically, to protect national infrastructure like this, vast barriers made of concrete would be used.

But doing that, said Mr Flikweert, would have had disastrous consequences for the villages of Bacton and Walcott. They are located a few miles down the coast and already face a significant risk of flooding.

A wall in front of the terminal would stop the sea from removing sediment there, causing it to take sediment from the villages instead.

"So the beach erosion there would go on even more quickly," said Mr Flikweert.

Image copyright Zandmotor Image caption The Zandmotor dune is expected to last for 40 years

Instead, the team turned to sand, inspired by a large-scale experiment in the Netherlands called the Zandmotor.

In 2011, Dutch scientists placed 20 million cubic metres of sand along a 1km stretch of coastline in South Holland.

The sediment drifted and moved with the currents, but it did the job of safeguarding the coast from erosion.

It was initially thought the dune might last for 20 years. But a recent analysis suggests the defence could last for twice as long.

Carola van Gelder-Maas, from the Dutch government's water management body Rijkswaterstaat, said: "In the beginning, we never expected it to have a life span of 40 years.

"We only 'lost' 1.5 million cubic metres of sand during these eight years. But sediment is still being transported, so the Zandmotor is still stretching and contributing to a more natural way of coastal maintenance."

Image copyright Getty Images Image caption Homes are being lost along the Norfolk coast as the cliffs erode

The scheme in Norfolk is on a smaller scale, but the hope is that it could offer 15-20 years of protection to the terminal and villages. After that, the sand would need to be replaced.

The team from Royal HaskoningDHV said the shape of the dune will change over the duration. And after big storm events, it could look like the sand is lost - but the natural movement of the sediment should rebuild it.

Mr Flikweert said it is not a permanent solution, but it does "buy time for the community".

"The experience with the Dutch Zandmotor shows that the concept works - we're confident ours will work," he said.

The £20m cost of the scheme is mainly covered by the Bacton gas terminal operators, with £5m from the Environment Agency and £0.5m North Norfolk District Council.

Image caption Sandscaping may now be considered to protect other parts of the coast

The expense of flood defences is something that many communities around the UK are having to consider.

And Dr Sally Brown, from the University of Southampton and University of Bournemouth, said the problem will get worse.

"We're going to see more possibility of flooding and more erosion with climate change, and we'll see the need for more flood defences.

"In places that we're going to choose to protect, defences are going to get bigger and they're going to be very different from what we see now."

But while the money might be more readily available for protecting national infrastructure such as Bacton or large cities, Dr Brown warns that others could lose out.

"We need to invest a lot to keep the coasts exactly as they are at the moment, and one of the biggest challenges is that we can't keep doing that in places that just protect a few people, or maybe in places where flood risks only affect a few houses, so there are going to be some really hard choices to come."

Many will be watching Norfolk's sandscaping project to see if it could work for other parts of the coast.

Sue Brooks, professor in coastal geosciences, from Birkbeck, University of London, said: "With the sandscaping scheme… there has been a shift from hard defending the coast to more of a nature-based solution. Put sand there - and let nature do with it wants.

"We don't know at this point how successful this scheme is going to be, but at least we're giving it a go, which is a really radical new way of thinking about shoreline management."

Follow Rebecca on Twitter.