After Cuban scientists studied the effects of climate change on this island’s 3,500 miles of coastline, their discoveries were so alarming that officials didn’t share the results with the public to avoid causing panic.

The scientists projected that rising sea levels would seriously damage 122 Cuban towns or even wipe them off the map. Beaches would be submerged, they found, while freshwater sources would be tainted and croplands rendered infertile. In all, seawater would penetrate up to 1.2 miles inland in low-lying areas, as oceans rose nearly 3 feet by 2100.

Climate change may be a matter of political debate on Capitol Hill, but for low-lying Cuba, those frightening calculations have spurred systemic action. Cuba’s government has changed course on decades of haphazard coastal development, which threatens sand dunes and mangrove swamps that provide the best natural protection against rising seas.

In recent months, inspectors and demolition crews have begun fanning out across the island with plans to raze thousands of houses, restaurants, hotels and improvised docks in a race to restore much of the coast to something approaching its natural state.

“The government … realized that for an island like Cuba, long and thin, protecting the coasts is a matter of national security,” said Jorge Alvarez, director of Cuba’s government-run Center for Environmental Control and Inspection.

At the same time, Cuba has had to take into account the needs of families living in endangered homes and a $2.5 billion-a-year tourism industry that is its No. 1 source of foreign income.

It’s a predicament challenging the entire Caribbean, where resorts and private homes often have popped up in many places without any forethought. Enforcement of planning and environmental laws is also often spotty.

“Different countries are vulnerable depending on a number of factors, the coastline and what coastal development looks like,” said Dan Whittle, Cuba program director for the New York-based nonprofit Environmental Defense Fund. He said the Cuban study’s numbers seem consistent with other scientists’ forecasts for the region.

Cuba’s preparations were on clear display on a recent morning tour of Guanabo, a popular getaway for Havana residents known for its soft sand and gentle waves 15 miles east of the capital.

Where a military barracks had been demolished, a reintroduced sand-stabilizing creeper vine known as beach morning glory is reasserting itself on the dunes, one lavender blossom at a time.

The demolition nearby of a former swimming school was halted due to the lack of planning, with the building’s rubble left as it lay. Now inspectors have to figure out how to fix the mess without doing further environmental damage.

Alvarez said the government has learned from such early mistakes and is proceeding more cautiously. Officials also are also considering engineering solutions, and even determining whether it would be better to simply leave some buildings alone.

For three decades Guanabo resident Felix Rodriguez has lived the dream of any traveler to the Caribbean: waking up with waves softly lapping at the sand just steps away, a salty breeze blowing through the window and seagulls cawing as they glide through the crisp blue sky. Now that paradise may be no more.

“The sea has been creeping ever closer,” said Rodriguez, a 63-year-old retiree, pointing to the water line steps from his apartment building. “Thirty years ago it was (33 yards) farther out.”

“We’d all like to live next to the sea, but it’s dangerous … very dangerous,” Rodriguez said. “When a hurricane comes, everyone here will just disappear.”