It's been the dream of millions _ a home by the sea in sunny Spain. People from all over Europe have invested hard-earned savings in coastal villas and apartments.

Now a government drive to clean up Spain's concrete-filled coastline after decades of abuse may wash away many of those dreams like castles of sand.

Enforcing a much-neglected 1988 law, the Socialist government is getting tough about what constitutes coastal public domain _ the strip of land stretching back from the water's edge _ and telling thousands of house and apartment owners their properties do not really belong to them.

"Out of the blue we've been told the house we have owned for more than 30 years is no longer ours," said retired British electronics engineer Clifford Carter, 59, who lives with his Spanish wife in La Casbah, a beach side complex in eastern Spain.

"The house was built legally, but now they say we can only live here until we die but can't sell the house or leave it to our children," said Carter.

The fears of losing coastal villas come as Spain's real estate market is turning sour, a situation tied by some to the international banking crisis and its parent, the U.S. subprime mortgage scandal. While the troubles of Spain's overgrown coast are not directly tied to the banking crisis, both have involved shady business practices that often wind up in the lap of individual homeowners.

Along the Spanish coast, a protest group formed in January says it already represents 20,000 people. It notes that up to half a million others _ apartment and villa owners and restaurant and hotel proprietors _ could be affected. Most are Spaniards, but many are foreigners.

"This is the single biggest assault on private property we have seen in the recent history of Spain," said Jose Ortega, a spokesman for the group and lawyer for many of those affected.

He says that at best, owners are being given 60-year concessions to live on the property or operate their businesses. Others, he says, are threatened with demolition.

The government says the claims are exaggerated but insists the coast has to be saved.

"We're taking the law seriously," said the Environment Ministry's coastal department director, Jose Fernandez. "Previous governments didn't think it was important, while we have made it a priority."

The government is finishing the process of drawing the line that designates what is state-owned and cannot contain private property along Spain's 4,900 miles of coast _ which includes the Canary and Balearic Islands and North African territories in addition the mainland.

It plans to spend some $8 billion to fix up the coast. Some of the money will go to homeowners who, under the 1988 law, cannot sell to another private party but can sell to the state.

Many people are suddenly finding they're on the wrong side of the dividing line. Ortega's group alleges the government is drawing it selectively, targeting individuals but shying away from tourist resorts.

But it's not just individuals. The five-star Hotel Sidi lies a stone's throw from retired engineer Carter's house and the shoreline. Last December its owners were told it had been built on dune land protected by the 1988 law and must go. They are being offered a 60-year operating concession, after which it falls into state hands.

"We're afraid that they'll take away the property. It was built legally with all the papers," said Roger Zimmermann, the hotel's managing director. "This is our livelihood."

Fernandez admits 1,300 structures have been demolished since the Socialists came to power in 2004 but insists most were constructed without permits. He denies the government has plans for mass demolitions or immediate expropriations. Barring exceptional cases, he says, people whose property is in the public domain will be able to continue living or working there.

Ortega says that is not comforting. "Today anybody who owns or wants to own a home or property on the coast can't be sure because at any moment the government can take it away from you without compensation," he said.

The economic impact on construction and tourism could be immense, Ortega argues.

This would be bad news for a real estate sector that has largely driven Spain's economy for the past decade but it now cooling sharply.

The Costa del Sol Association of Builders and Promoters reported in February that sales of tourist property in southern Malaga province fell nearly 50 percent last year. It claimed the main problem was people being frightened by corruption scandals in which homes were built with licenses obtained through bribes.

Tourism and rampant construction over the past three decades have turned the Spanish coast from the French border all the way round and beyond the Rock of Gibraltar into a continuous mass of concrete.

In many cases, town halls bypassed planning regulations and took bribes in exchange for licenses.

Spain says 40 percent of the coast is built on and nearly 70 percent of its beaches are surrounded by buildings.

"It was the politics of money today, forget about tomorrow." said Luis Cerrillo, head of the Ecologists in Action group in the Valencia region.

Spain, the world's No. 2 tourism destination, is the most popular choice for northern Europeans seeking to own a second home. Just British residents in Spain are believed to amount to nearly 1 million _ though it's not certain how many own property.

Most observers agree it is no coincidence that the coastal clean-up drive follows a real estate fraud scandal on the Costa del Sol in 2006 in which 80 people face charges.

Gordon Turnbull of Blue Med estate agents in the eastern Murcia region blames the corruption scandals and international banking crisis for dropping sales, but argues the coastal law might actually stimulate the market by making the coast prettier.

On two nearby beaches, he says there are the shells of two major apartment buildings, illegal and unfinished monstrosities.

"They put people off buying here," said Turnbull. "People appreciate seeing an eyesore getting knocked down. The government's not doing enough."

(This version CORRECTS the length of the Spanish coastline to 4,900 miles.)

Copyright 2008 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.