A few hours and a mojito or two after arriving in this 500-year-old city, with its ocean vistas and dazzling architecture, American visitors often ask: Can I buy a piece of this?

They cannot. The Cuban government doesn’t allow it. The U.S. government doesn’t allow it.

Not yet, at least.

But with the two countries moving to restore diplomatic relations and end decades of estrangement, it is not difficult to imagine a day when pent-up global market forces will wash over this city’s sagging buildings and mansions in distress. Cubans are already angling to get ahead of the flood.

Three years after Raúl Castro cast aside decades of communist housing dogma and allowed homeowners to buy and sell their properties for the first time since the 1960s, the island’s real estate market is proving to be a powerful engine of economic and social change.

A cat peeks its head from a door of an ocean front antique house that faces The Malecon. (Sarah L. Voisin/The Washington Post)

On seemingly every Havana street, contractors are mixing cement, fixing cracks and giving makeovers to moldy facades that haven’t seen paint since the ­Brezhnev era. New bathroom fixtures arrive in couriers’ suitcases from the Home Depot aisles of South Florida. Havana’s skilled electricians and plumbers earn more in a day than a doctor makes in a month.

“It isn’t only the ability to buy property,” said Magda Mora, 39, who returned to Havana in 2012 after 14 years in Italy and Miami. “It’s buying property that can be used for a business.”

Mora bought a 3,300-square-foot duplex in the heart of the city’s Vedado neighborhood, renovated it and now lives upstairs with her family, converting the lower unit into a mini-hostel. It has five rooms that rent for $35 a night each, earning good reviews on TripAdvisor.

Anyone who has driven around Havana has seen that a tremendous amount of wealth was invested in stone, marble and mahogany in the years between Cuba’s founding as a republic in 1902 and Fidel Castro’s takeover in 1959. Few cities in the Americas can compare.

Wealthy and middle-class Cuban families who fled for the United States saw their homes expropriated by the government. Many went to poorer Cubans or the caretakers that the wealthier families had left behind. The city’s exclusive neighborhoods became racially mixed, and Havana became a much more “heterogeneous city,” according to architect and city historian Miguel Coyula.

Today, many of those families are selling, finding themselves suddenly in possession of a valuable asset. But that trend ­appears to be re-gentrifying the city along racial lines and class divisions, particularly because lighter-skinned Cubans are more likely to have relatives abroad with money to invest.

Castro’s 1960 housing reform led to a ban on property sales and a decree that no Cuban could possess more than one urban dwelling, while converting hundreds of thousands of renters into owners — albeit owners who couldn’t sell.

A young boy jumps up to look into a window of an antique building in Old Havana. (Sarah L. Voisin/The Washington Post)

Although Cubans were allowed to “swap” houses in deals that often involved under-the-
table cash, the lack of a formal market, along with government restrictions on private home construction, worsened a shortage.

The problem is exacerbated by a supply crunch as the Cuban government consistently falls short of its housing-construction goals. More than 130,000 city residents are living in shelters or substandard housing, according to government data. Migrants from poorer eastern Cuba settle in shantytowns on the city’s edge or crowd into crumbling urban tenements that the real estate boomlet has yet to reach.

Meanwhile, elderly Cubans whose children left the island remained in large homes they couldn’t afford to maintain.

“There were thousands of homes sitting vacant or half-empty,” Coyula said.

Ways around the rules

Market forces are now fixing such absurdities, brokers say, ­allowing older Cubans to easily downsize and get the cash they need to live on, while new investors are transforming tattered properties into boutique hotels before an American tourist surge hits.

Significant restrictions remain. Cubans are limited to one property in the city and one vacation home. Titleholders must be Cuban citizens or permanent residents, not foreigners. The deals are almost always done in cash, and the transactions must pass through Cuban banks, though buyers and sellers often agree to exchange additional sums outside the country to minimize tax payments.

Communist authorities are in the game, too, building high-end condominiums for sale to non-Cuban buyers, with plans to erect more alongside golf courses and yacht marinas in partnership with Chinese investors.

As usual, Cubans have found ways to skirt their government’s attempts to control the market, as have Cuban Americans (and U.S. residents) blocked by the U.S. trade embargo. Some buyers acquire additional properties in the names of their children, while foreigners find Cubans to put on the deed, despite the risk that they would have no legal claim to the property.

At a deeper level, Raúl Castro’s limited real estate liberalization has brought a sea change in Cubans’ regard for their homes, transforming them from yet another domain of state control into a tangible asset whose value needs to be preserved, if not improved.

The reform is even altering the relationship between local government officials and Cuban property owners, who are no longer passive about broken sewer pipes, uncollected garbage and perpetually neglected city parks.

“People see that the value of their homes is related to their surroundings,” said Nery Galindo, who obtained a license as a private real estate broker as soon as the government legalized the trade in 2013.

Her company, Espacio Cuba, has two offices in Havana and a Web site in Spanish and English with photo galleries and a database of properties listed for as much as $650,000.

Similar sites have advertised 1940s- and '50s-era mansions for more than $1 million. The phrase “capitalist construction,” referring to properties built prior to Fidel Castro’s revolution, is used as shorthand for “quality.”

Most of the listings are in Havana’s most desirable districts, especially Vedado and ­Playa. A typical three-bedroom, two-bath apartment in those neighborhoods sells for about $60,000, while detached houses there are often listed for $100,000 or more.

That’s a fortune in a country where the average government salary is stuck at $20 a month. But those Cuban workers aren’t the target demographic, unless they’re the ones selling. With salaries that low, many of them are — especially if they live in Havana’s more coveted districts.

Mora, the mini-hostel owner, said the family that sold her their house used the money to buy a Russian Lada sedan and two smaller apartments in a less central part of the city. “Their son uses the Lada as a taxi,” she said. “So it worked out well for everyone.”

Overseas money

It’s no secret that much of the money flowing into the Cuban market comes from outside, ­especially Europe and the United States.

Galindo said inquiries through her site have doubled since President Obama and Raúl Castro announced plans in December to restore relations. The biggest spike is from Cubans in the United States who have relatives on the island able to occupy the properties or manage them as rental units.

A surge in tourism this year has left the city with an acute shortage of hotel rooms, and millions of American visitors are expected in the next several years if Congress approves legislation to lift travel restrictions. Apartments in the city’s most desirable neighborhoods are quickly being converted into rentals, spurred by the recent arrival of companies such as Airbnb that allow Americans to book rooms online.

Brokers say many of the new buyers are Cubans who, like Mora, left the island and want to regain a foothold or secure a cheap place to retire. This appears to have the indirect political consequence of making them stakeholders who prefer a gradual evolution in Cuba rather than an upheaval that would hurt their investment.

“The number of serious buyers has increased significantly on hopes for change after the [Dec. 17] speeches by Obama and Castro,” said Milly Diaz, owner of Cuba Homes Direct, another start-up real estate agency. She returned to the island after working for several years as a broker in England. She said prices were all over the map when the market first opened up in 2011.

“The market is still immature, but there’s a bit more experience now, and sellers are more and more willing to negotiate,” she said.

Read more:

The Cuban town Mr. Hershey built

Smitten with Cuba? Better call the love detective before you commit

Starting up in Cuba, but not connected to the Internet

Today’s coverage from Post correspondents around the world