Image copyright TJERK VAN DER MEULEN Image caption Tens of thousands of people took to the streets of Amposta in Catalonia to protest at plans they say would destroy the delta

Environmentalists say one of Europe's most important wetland areas is under threat as Spain and the region of Catalonia argue about the future of the Ebro river.

Campaigners say Spanish government plans to restrict water flow could destroy the fragile landscape.

They are worried that ultimately these waters could be transferred to other, drier regions of Spain.

Tens of thousands of demonstrators took to the streets of Amposta in Catalonia on Sunday to protest against the plans.

Running for 930km (578 miles) the Ebro is the third longest river flowing into the Mediterranean.

Its journey begins in Cantabria on the north coast of Spain but it flows through nine autonomous communities before joining the sea in a Catalan delta that stretches over 32,000 hectares (79,000 acres).

The delta is a national park and it is recognised internationally as being a critical resource for birds and wildlife. In addition the rich waters help produce huge amounts of foodstuffs including rice, fruit and vegetables.

Image copyright SPL Image caption The green and fertile Ebro delta is a wildlife sanctuary and a major agricultural region

The most important element in the preservation of the delta, which faces huge challenges from human development and the sea, is the flow of water and sediment from the river. The sediments protect the integrity of the wetlands and guard against the ingress of saline water.

But development, irrigation and dams along the length of the river have cut the sediments by 90%.

"The most important problem is the lack of large floods," said Dr Carles Ibanez, who studies aquatic ecosystems at IRTA, the Catalan government's research institute.

"In the past this was the way to bring sediment especially sand to the mouth of the delta but this is not happening anymore not just because of regulation but because of dams. We are looking for an environmental river flow that should include these floods in a controlled way."

The Spanish government has been trying for decades to put in place a plan to regulate the river and put the rights to use the waters on a firm legal footing. In January it finally agreed on what is termed the Ebro River Basin Management Plan.

But the approach has drawn huge criticism from local campaigners who believe they have prioritised the interests of farmers and developers over the environment.

"Under EU law you have to set the minimum environmental flow to conserve the river and the delta and then you can start to talk about any excess water and what to do with it," said Brian Cutts, who lives in the region and is a long time member of PDE (Plataforma en Defensa de l'Ebre).

"But Spain has always gone about it the opposite way - They write down the amount of water they need for the nuclear power station upriver, and for irrigation and whatever is left would be the environmental flow that the river would have."

But the Spanish ministry of agriculture rejected the idea that the plan would be bad for the river or the region.

"The Spanish rivers will have better storage conditions, contributing to the protection of ecosystems and improve the quality of life of citizens," they said in a statement about the plan.

Image copyright TJERK VAN DER MEULEN Image caption Campaigners fear that the Spanish government wants to divert water from the Ebro for other parts of the country

As well as the threat posed by dams and irrigation, campaigners are also worried that the government intends to transfer water out of the river and send it to more arid parts of the country.

This plan was also tried in the early 2000s but collapsed in the face of public and EU opposition. The government is set to put in place a national hydrological plan this year but this time round, campaigners believe the authorities will attempt the same outcome but by different means.

"They will award water concessions to different groups of irrigation farmers, who may not be able to pay for the water they have been conceded," said Brian Cutts.

"They may then be able to sell it via water banks to other users in other parts of Spain."

Rise of nationalism

One key change in the dispute has been the rise of Catalan nationalism. When the transfer plan was first mooted at the turn of the century the Catalan government did not object. Now it is being seen as the frontline in the battle to win power back from Madrid.

The turnout at the weekend protest in Amposta was designed to impress on the national government that people in the region see the future of the Ebro and the delta as a huge political issue. They were also hoping to impress a visiting delegation of European parliamentarians that the EU should intervene.

"It's become a big symbol of the Catalan Spain conflict, a lot of people seeing it as the red line," said Brian Cutts.

"The last thing the Catalan people are going to accept at this moment is Spain saying what they can do with the river Ebro and Spain diverting the river to other parts of the country.

"It's like Spain doesn't care and is willing to see the end of one the most important national areas that we have here."

Follow Matt on Twitter @mattmcgrathbbc and on Facebook.