A high piece of wall came down in the middle of dress rehearsal. The musical was Victor/Victoria, the gender-bending comedy, and young dancers in black leotards ran and scattered in all directions, screaming, as the patch of plaster broke free, plummeted down, and landed with a harmless thud off stage right. A puff of powder marked the strike zone, amid elaborate lighting fixtures that run up each side of Teatro América. The big lights were designed to frame rising rows of seating and to illuminate the audience, not the stage. In the Havana of the 1940s and ’50s, the people themselves were the drama.

Jorge Alfaro Samá, the theater’s artistic director, didn’t move. Standing at center stage, he quickly dismissed the falling plaster as “nothing.” The dancers returned, to nervous giggles, and then listened to him finish reviewing their call schedule. Entire buildings collapse all the time in Havana, so losing a patch of wall or ceiling is routine, even in one of the city’s most cherished and popular venues. This is a dress rehearsal, Alfaro Samá reminded the actors—call it good luck and hit your marks.

Offstage, the director suggested that I follow him to a quieter location—presumably one with solid walls. We climbed up the long empty rows and crossed through the marble lobby, with its twin sweeping staircases and fat balustrades. Opened in 1941, the theater evokes an ocean liner, with its lack of straight lines and a floor mural of the Western Hemisphere wrapped in zodiac signs. It’s all curves and soft corners; extravagant art deco styling is squeezed into ticket booths and tangential lobby bars. Alfaro Samá led me through a small office, into a smaller one, and finally into a tiny area behind it, filled by his desk and the two of us. Like the innermost chamber of a snail’s shell, this is the impresario’s safe space. Photos of Latin performers who have appeared at the theater, dating back decades, crowded the little area behind him.

The problem of the plaster, Alfaro Samá said, was typical of Cuba. He was determined to restore the theater “to how it was in its golden age,” but could do little more than repair a few details. The space was heavily used (acts from rappers to musical theater were booked four nights a week, and I’d once felt imprisoned here during an hours-long rumba performance), allowing no time for proper restoration. Maintenance of a public building is the responsibility of bureaucrats outside the theater anyway. “I’ve worked here 18 years, and in that time we learned to work around problems,” Alfaro Samá said. They had patched walls and ceilings before, and they would do it again.

In more than two decades of reporting in Havana, I’ve grown accustomed to the visual signatures of the city: grimy old buildings, rattletrap cars, little that is new or bright. But that is only on the surface; in Cuba, there is always an inside, a life of interior spaces, and this is especially true amid the city’s hidden gems of architecture.

Teatro América is one such gem, concealed in plain sight behind a dull screen of gray polygon concrete on Galiano Street. When the theater opened, this part of Centro was the commercial artery of Havana, and the marble walkways held the names of now vanished department stores. Galiano is still chaotic—during my visit in March, I was nearly flattened by a man unloading smoked ham hocks from the trunk of a 1950s car, and had to push aside mattress vendors to reach the theater. But step inside and you are in the museum that is Cuban architecture.

There is no city in the world so layered with hidden beauty. Yet today, as Havana opens to the world, it is also poised at the edge of collapse. Love of the city, which I have visited regularly for a quarter century, brought me back looking for answers: Can a place long known for its decay become dedicated to preservation? What can be done to protect its architectural legacy? And how can that be accomplished while also meeting the growing demands of Cuba’s hard-pressed and ambitious people?

Lesson one: Keep your eyes peeled for chunks of falling plaster.

**********

Havana is a city easy to navigate, limited by the sea and divided from its suburbs by a river. Each neighborhood seems defined by historic landmarks. Old Havana, founded in 1519, still spreads out from the original Plaza de Armas, the civic space of medieval Spain. Next out from the harbor, in distance and time, is its modern equivalent, the Parque Central district, overseen by the National Capitol building, based on the Panthéon in Paris (not the U.S. Capitol, as sometimes claimed). Next are the elegant and faded apartment blocks of fin-del-siglo Centro, followed by the Vedado business district, still dominated by Welton Becket’s 1958 Hilton hotel, a 25-floor modernist statement renamed the Hotel Habana Libre. Beyond, there is the 20th-century suburb of Playa, visually defined by the spacious and arrow-straight Avenida Quinta (“fifth avenue”), lined with the luxurious mansions of Cuba’s old rich and miles of precise topiary.

Even symbols of communist power—the tower of what was once the Soviet Embassy in Miramar, or the barren asphalt plain of Revolutionary Square—have redeeming value in making orientation easy.

Then all you have to do is look up. “Havana is a library of architecture,” says Raúl Rodríguez, a Cuban architect-in-exile with a deep passion for Cuban history and architecture. “Every style is well represented there, and the reason for its magic is the tripartite culture”—African, American, European.

From the very beginning, the city was a mixture: star-shaped forts from medieval Europe, shaded Moorish colonnades, Greco-Roman columns, French landscaping, and the iconic Malecón seawall built by the U.S. Army Corps of Engineers. Exiled Bauhaus stars like Walter Gropius visited Cuba during the 1940s, and with an influx of influential Cuban architects trained at Columbia University, the city became an eclectic crossroads.

Various structures and styles competed for attention. In 1930, the Bacardi family built a tower named for themselves that mixed art deco with eccentric combinations of etched amber and steel, and terra-cotta bas reliefs by Maxfield Parrish. (Ask to see the old private bar.) I’m particularly fond of another art deco excess, the Maternity Hospital erected in 1940 by José Pérez Benitoa. The gorgeous Cine-Teatro Sierra Maestra movie theater, located in the Rancho Boyeros suburb, is art deco but features a Maya-motif interior.

The layers continue through 1958, with only a few gestures since then, notably the National Art Schools in suburban Cubanacán. It was there that a collective of Cuban architects turned a private golf course into a winding campus of vaulted rehearsal halls, terra-cotta painting studios, and elaborate classrooms. It was a utopian dream of social progress, but by 1965 the project had collapsed and was abandoned to the jungle. Now partly reclaimed, it struggles along like the revolution itself, leaking badly but still active.

**********

Rodríguez is proud of that extensive catalog of eras past. But most critical to Havana’s architecture may be what has not happened since. “There’s a crust that has developed,” says Washington, D.C., architect Gary Martinez, “an age of time over the entire city.”

Martinez has visited Havana for 15 years, studying the city’s theaters, dance studios, and other public spaces. I asked him the question every visitor grapples with: What makes Havana—dirty, impoverished, dilapidated—so seductive? “We are overwhelmed by the visual complexity,” Martinez said. “The decay. The texture. The colors. The seemingly random organization of buildings. There’s nothing quite like it.”

He described finding an old theater with a retracting roof. Judging from its appearance, he expected it to be abandoned. Instead, he and some companions discovered men repairing cars in what used to be the lobby. Pushing farther inside, they found a dance troupe training onstage. Thanks to decades of improvised and incomplete repairs, the roof still retracted—sometimes.

The past has not passed, not in Havana. It’s very much present. And yet—this is the key—so are the Cuban people, persevering in the here and now, against the odds and after a span of many difficult decades. The result is a surreal overlap of eras, a time-travel experience on every block. That is the magic.

“They were fixing cars in the lobby,” Martinez marveled.

**********

I’ve had that moment—that strange, surreal feeling—often in Cuba. It occurred the next day when I walked the length of the Calzada del Cerro, a neighborhood that twisted toward Old Havana, each house fronted by a portico, loggia, or arched arcade that created one continuous shaded walkway for a mile or so. The richly ornamented 19th-century buildings had become dilapidated. One family invited me inside to drink strong coffee and watch baseball on a flat-screen TV. Rooms were separated only by towels, the stairs were jerry-built out of concrete blocks, the living room was now a garage, and tin roofing kept the rain out.

“The government said it would get the tiles we need” to maintain the historic character of the building, “but it never comes,” said Elmis Sadivar, the matron of the household. As we watched the ball game, she was anxiously checking her cell phone for updates about her adult daughter, who had recently left for America illegally. The family couldn’t afford to fix things themselves, she said: “A bag of cement costs half a month’s salary.”

Next door I found a man in his 70s trying to build a roof for his home, which in the meantime had blue-sky views. A house on the corner was similarly roofless, at least on the front side, and a careening garbage truck had recently taken out two of the four columns supporting the 19th-century arcade. People living in the back had refused to move out of the house, valuing the close-in location more than they feared the risk of collapse.

**********

Yet the revolution has treated some of its treasures with great care. These include homes confiscated from wealthy exiles in 1959, many of them parceled out as embassies and cultural centers. The revolutionary government transferred the contents of those homes—a trove of ceramics, paintings, statues, and other objets d’art—to official buildings and Cuban embassies, as well as to small museums, including the Museum of Decorative Arts in Havana.

Located in the 1927 mansion of José Gómez Mena, whose sister María Luisa was a high-society Havana hostess and patron of the arts, the museum is an overstuffed repository of 33,000 knickknacks and other memorabilia. Sèvres porcelain and Louis XV vitrines are crammed everywhere, mounted on pedestals or encased in flimsy display cases that look vulnerable to any tourist stepping back for a selfie.

I’d come here to ask deputy technical director Gustavo López about our shared passion for art deco architecture, but he immediately clarified a point as we sat down in his office. American-style art deco is strong in Cuba, López said, but it’s not unique; it also exists in Florida and New Zealand. Colonial architecture is more often regarded as “the jewel here,” he explained. And the gems of colonial architecture are in Old Havana, the protected part of the city.

Old Havana, with its narrow streets and centuries-old fortresses, has been largely saved from ruin for one reason: “It had the good luck to be inside the jurisdiction of the city historian,” said López, speaking of Eusebio Leal, an unassuming but highly regarded official. Leal was given unprecedented authority in the early 1990s to rebuild the entire district, serving as its de facto mayor and renovation tsar.

The best example of Leal’s power and methods may be the Plaza Vieja (“old square”), which is, as the name implies, the oldest of Havana’s original five plazas. “I remember as a student climbing over mounds of rubble there,” López said, describing the 1980s. “You had to be careful.” Leal was allowed to create special tourism companies, which recycled income into new renovations that, in turn, created more tourism revenue. The process can be slow—in another neighborhood, I watched Cuban workers take more than a decade to renovate what is now the Parque Central, the district’s flagship hotel—but the improvements have been undeniable.

When I first saw the Plaza Vieja, in 1991, it was a wreck of marshy sinkholes and collapsing buildings, the houses all around it apuntadas, or “on points,” and braced against collapse. Today the Plaza Vieja is filled with restaurants and shops aimed at tourists, but it’s also populated by ordinary Cubans—elementary school students on a class trip, young lovers taking selfies, teenagers chasing soccer balls. The surrounding blocks are dense with longtime residents. “Against wind and tide, he’s done it,” architect-in-exile Raúl Rodríguez said of Leal. “He is a hero even to Cubans who left Cuba. What he has done is going to outlast him and us.”

But Leal’s brief has mainly covered Old Havana, and a few of the oldest historic sites outside it. In much of the rest of the city, budgets for architectural restoration are much less robust and don’t necessarily benefit from tourist revenue. Leal’s team has “more resources; they have their own methods,” López said with a sigh.

**********

Where no one has the resources or personal interest to help, however, gorgeous architecture crumbles to ruin. One elegant building at risk is the Club Náutico. This prestigious old beach club in Havana’s suburbs is an airy, overlapping series of shells designed in 1953 by Max Borges Recio, who also designed the Tropicana Club. The facility has been corroded by sea spray, a huge problem on the waterfront.

Other grand buildings have been lost in this way, including a seaside amusement park in Miramar called, improbably, El Coney Island. Rusted carousels and a tiny Ferris wheel once fronted a sea-facing pavilion here, but in 2008 Chinese investors replaced it with a concrete theme park called Coconut Island.

In 2013, Camilo Valls, a Cuban arts journalist, told me about a beautiful old Moorish theater whose landmark bronze doors had simply disappeared one day—looted. By 2016 he was losing hope: The imperiled buildings of Havana would soon be “all gone,” he said. Valls then described to me the new Cuban vernacular, which he called “kitsch style.” This is the cringe-inducing tendency to rip out historic features and replace them with new-money displays. People toss away “old” light fixtures and install made-in-China chandeliers and flat-screen TVs. I heard of one man who tore the corner off his art deco house—with a bulldozer—to build a media room for his PlayStation.

“There will be a disaster if we don’t have norms,” López told me.

**********

One building that epitomizes those risks is the López Serrano, an elegant tower in the modern downtown. In 1932, the 14-story apartment building was the tallest structure in Havana, an emblem of modernism that evoked Rockefeller Center. It still has great bones—the ziggurats and shafts of the building, by Ricardo Mira and Miguel Rosich, make it a kind of vertical art deco—but walking up to it, I saw how badly it had aged. The gray concrete is sweat-stained, with many of the wooden window frames cracked and the odd piece of glass punched out and replaced with cardboard. Air conditioners and improvised laundry lines clutter the narrow spaces overhead; rain cracks begin near the roof and run down the facade.

“Five hundred and forty-four windows of real wood and glass,” explained Sarah Vega, a Cuban journalist who lives on the seventh floor. Vega has made a short film, Deconstruction, about the building’s history, which was designed to represent Cuban aspirations for a modern society. The twin portals at the front door are bronzed bas reliefs, still gleaming, and visitors pass through a marble lobby to twin elevators divided by “Time,” a bas relief by Enrique García Cabrera infused with aerial speed and futurism. An art deco clock used to sit over the sculpture but someone stole it. Even the light fixtures on the ceilings are wired shut to prevent anyone from swiping the fluorescent bulbs.

Vega gave me a tour of her apartment, which she shares with her mother and son. The López Serrano was aimed at Cuba’s rich, but the rooms are relatively small—the ideal customer also had a big country house. The 1932 bylaws even banned children—which was possible because this building was the country’s first co-operative apartment corporation, emblematic of Cuba’s turn toward an urbanized society. The building wasn’t progressive—the same 1932 bylaws banned black people from buying apartments—but the López Serrano was long associated with one of Cuba’s greatest heroes, the crusading reformer Eddy Chibás, who kept his offices on the top two floors. In the 1940s, Chibás railed against corruption and dictators from an office with sweeping views of the Cuban Republic. He shot himself while hosting his radio program one day, a suicide-protest commemorated with a plaque by the building’s front doors.

In ’59, the rich fled and the needy moved in. Vega is proud that empty apartments and houses across Cuba were handed out to the poor. But it was a “culture change,” she noted, with many new residents unconcerned with the López Serrano’s history or its preservation. It’s a pervasive problem: “People often don’t know where they are living, when it was built, if it was a famous architect,” said Gustavo López. “If you don’t care for what exists, it disappears.”

During the desperate economy of the 1990s, some of Vega’s neighbors began selling off elegant fixtures and even the building’s original toilets. That’s when the art deco clock over the elevator disappeared. “It’s not just money,” she said of the building’s problems. “It’s lack of knowledge.”

**********

As in many endeavors, when it came to preserving the López Serrano, Cuban officials had good intentions and poor execution. Distant bureaucrats with scarce resources oversaw the building, making sporadic and only partly effective repairs—the massive front doors were refurbished, but when new elevators were installed, workers trimmed away marble detailing to make them fit. For decades the government vowed to fix the original windows but recently gave up pretending. Residents would have to pay for the job themselves. “That costs a lot of money,” Vega said. “We can’t afford it.”

Perhaps this is the greatest threat to the López Serrano: No one really owns it anymore. The revolutionary government nationalized all apartment buildings in 1959, but about a decade ago retreated from that policy, returning ownership of apartments to the residents. Yet the government retains responsibility for the shared public spaces and exteriors. That works in high-priority areas like Old Havana, but in the rest of the city, decay is the rule. Many buildings look substantially worse now than when I first arrived in 1991. An astounding portion of the city’s buildings are roofless wrecks. No one is truly in charge.

Sarah Vega’s mother suggested they would forge ahead, offering a Cuban truism: “We’ll fix what we can, with what we can get, with what we have,” she said.

**********

The ziggurats of the López Serrano point to a difficult future. If the residents there—at least some of them more educated and historically conscious than the average Havana resident—are incapable of saving their building, what of the rest of the city, and of Cuba?

Paradoxically, there may be hope in Cuba’s economic weakness: In a land with little money but plenty of skilled craftsmen, simple forms of preservation are often the best option. Wealthy foreign developers are not allowed to overwhelm whole neighborhoods, yet Cubans, as they gradually earn more money, can renovate bit by bit. Part of one building becomes a restaurant, a house becomes a hotel, and even without a master plan, the scale of a block and the character of a district are maintained. “Kitsch style” encroachment could be staved off by strengthening Cuba’s historic preservation standards, particularly for exemplary buildings.

Architect Gary Martinez favors this approach. Huge areas of the city are fallow, with buildings either underutilized or simply abandoned, he said; let people fix them up, slowly, on their own. “There is so much building stock,” noted Tom Johnson, his business partner, “that it can almost infinitely accommodate small changes.”

There is also talk of big change—the Cuban government has asked for investment to rebuild the port of Havana, with new and much needed housing on the far side of the harbor. But Havana’s social peace will depend on keeping Habaneros invested in the city themselves. Just as Eusebio Leal has been able to preserve the residential character of Old Havana as he rebuilt it, others should be empowered to extend that model to other parts of the city. The challenge is to accommodate the next Havana, even while preserving all of the previous ones.