Managua, Nicaragua; and Mexico City — When Guillermo Martin Treminio's house crumbled in the 1972 earthquake that leveled Nicaragua's capital, killing 10,000 people and destroying 50,000 buildings and homes, he had nowhere to go. So he moved his family into a crumbling apartment building in downtown Managua that the wealthy had abandoned.

Mr. Treminio's refugeelike living conditions, which he had once hoped would be temporary, became home for almost 40 years. "We had lost hope," he recalls.

But now he has finally moved his family into permanent housing, thanks to a government program to relocate 103 families who also squatted in the skeletal remains of four abandoned high-rises known as "the ruins." It's one of the last efforts of cleanup after the devastating quake.

Their four-decade-long plight may be extreme, but it highlights a reality in the wake of large-scale disaster, both natural and human-caused. Though critics often fault governments and aid organizations for the slow pace of reconstruction, months and even years may pass before the displaced regain a solid sense of home.

In Haiti, a year and a half after its devastating earthquake, permanent housing reconstruction has not even begun. Even after the 2004 Indian Ocean tsunami, the aftermath of which is seen as a model for reconstruction, it took four years for families to find permanent homes. Five years after hurricane Katrina in the United States, thousands remained in temporary housing.

That is certainly the case in many parts of historical downtown Managua – a crossroads of fault lines that has been left in weed-grown partial abandonment since the 1972 quake. In total, 541 city blocks in Managua were destroyed or irreparably damaged and had to be leveled afterward.

The majority of middle- and upper-class citizens fled, joining an exodus of 250,000, more than half the population of the city. But those living in shantytowns had no place to go, so they forged lives for themselves among the devastation, waiting for government help. "We thought we were going to die there. We never thought we would be moved out," says Erminia Pineda, a longtime resident of the apartment buildings, where as many as 45 people would live on a floor built to house only four or five and which was governed by its own set of laws and social norms. Each floor had its own hierarchy of power, based on seniority and economic clout within the buildings. Residents took care of their own security, organizing into vigilance groups to watch over one another's belongings. Walls often fell down. Rain came through cracks. Each time the ground shook, residents worried the buildings would come down.

Temporary living is fraught with vulnerabilities, says Lilianne Fan, an independent consultant on humanitarian policy and postcrisis reconstruction who has worked in Haiti and Indonesia. Those displaced often face problems with sanitation, little access to education and health care, and limited security. The psychological pressures of not having permanence can also take a toll.

The challenges of postdisaster reconstruction are many. Among them: removing rubble, planning settlements, securing funding, procuring materials, and training builders. While aid organizations sweep into disaster zones, the degree to which they can participate in large-scale reconstruction is limited. When a disaster occurs in a developing country without a strong government, reconstruction takes even longer.

"There are some misperceptions about what the private or voluntary sector can do," says Mr. Redlener. "The larger the disaster, the more necessary it is to have the government as the principal driver of recovery."

Those in Nicaragua blame previous governments for ignoring their plight. "The neoliberal governments [from 1990 to 2006] promised us homes, but it was all a lie," says Treminio.

But now that is changing. In early April, 30 military trucks rolled up in front of the ruins to evacuate the 700 people living there, moving them to a new neighborhood of cement-block homes about six miles away.

While some squatters resisted the move, arguing that the housing settlement was too far removed from Managua's main marketplace, many are glad to get out of the dilapidated buildings, which city officials have deemed a "deathtrap." The buildings were leveled in May.

Starting anew is a challenge for some. "It's harder here, but you can't have everything," Ms. Pineda says in her new neighborhood. "New beginnings are hard everywhere, but we have a house, we have a roof, and we have water. And that's what's important."