Claribel Alegría, a poet who wrote of the harsh realities of Central American life and the search for identity and hope — work informed by her own uprooting, first from Nicaragua and then from El Salvador — died on Jan. 25 in Managua, the Nicaraguan capital. She was 93.

Reporting on her funeral in Managua two days after her death, the newspaper El Nuevo Diario wrote that her ashes would be divided between the two countries. Her parents had taken her to El Salvador from Nicaragua when she was a baby, but she returned there to live years later.

“El Salvador is the fatherland because it’s where I grew up,” she told an interviewer in 1999. “But my motherland, Nicaragua, has welcomed me with open arms.”

During her lifetime she saw both countries torn by struggles for liberation. That tumult was reflected in the dozens of books she wrote, not only poetry but also novels and histories, some written with her husband, Darwin J. Flakoll. Hers was sometimes a blunt vision, as in “Documentary,” a poem about El Salvador that includes these lines:

Besides the coffee

They plant angels

In my country.

A chorus of children

And women

With the small white coffin

Move politely aside

As the harvest passes by.

“I wrote that poem a long time ago, and some people said it was a political poem,” she told Bill Moyers for his book “The Language of Life: A Festival of Poets” (1995). “I laughed. To me it was a love poem for my country, and I wanted everybody to come and see what I was seeing. I wanted them to see why it was such a desperate situation.”

Clara Isabel Alegría Vides was born on May 12, 1924, in Esteli, Nicaragua. The country was on its way to civil war, and United States Marines were there. Her father, Daniel, a doctor, was among those who viewed the Marines as an occupying force, and while she was still a baby he moved the family to El Salvador, the native land of her mother, Ana María Vides, a member of a prominent coffee-growing family.

Ms. Alegría said she began writing poems when she was 6. As a child she also had thoughts of being a great dramatic actress — but not for long.

“Then I realized that I had a crooked face, that my left side was very different from my right side,” she told Mr. Moyers, who had asked about imagery involving mirrors in her writing. “With my left side I could be glamorous, but with my right side, no — there I was always very much down to earth. From then on, mirrors haunted me.”

At 18 she went to the United States to study at George Washington University, and while there she met the Spanish poet Juan Ramón Jiménez, who would later win the Nobel Prize in Literature. He became a mentor and, she recalled, advised her that her forays into free verse were premature.

“First you have to go through all the traditional forms,” she said he told her. “You can free yourself after that. Then you will know what you are doing.”

He selected the works for her first book of poetry, “Anillo de Silencio” (“Ring of Silence”), published in 1948. She also received a bachelor’s degree in philosophy and letters at George Washington that year.

She married Mr. Flakoll, an American journalist and diplomat, in 1947, and they lived in Mexico, Chile, the United States, Uruguay and on the island of Majorca in Spain.

Ms. Alegría considered El Salvador her homeland, and she had been returning regularly to visit, but that changed in 1980.

She was scheduled to give a poetry reading at the Sorbonne in Paris but learned the day before that El Salvador’s archbishop, Óscar Arnulfo Romero, a prominent voice against social injustice and government repression, had been assassinated. Instead of reading poems the next day, she talked about the murder and the campaign of violence by the military government, which was backed by the United States.

“Soon after that, my cousin, Vides Casanova, then minister of defense, sent word that I should never come back to El Salvador,” Ms. Alegría told Bomb magazine in 2000. “Otherwise, he would not be responsible for what happened to me.”

She was not able to return for 12 years, during which El Salvador was in civil war. Her poem “Unfinished Rite” is about not being able to return for her mother’s funeral in 1982.

In the 1980s she and her husband, who died in 1995, returned to Nicaragua to live. Their books together included the histories “Tunnel to Canto Grande,” about the escape of political prisoners in Peru in 1990, and “Death of Somoza,” about the Sandinista commandos who assassinated the exiled Nicaraguan politician Anastasio Somoza in 1980.

Ms. Alegría’s many books of poetry include “Flowers From the Volcano” (1982) and the bilingual collection “Saudade/Sorrow” (1999). She also wrote children’s books.

Her survivors include her children, Maya, Patricia, Karen and Erik.

The Nicaraguan poet Daisy Zamora once called Ms. Alegría “a voice for the voiceless and the dispossessed.” In the 2000 Bomb interview, Ms. Alegría spoke of the reluctance of people in El Salvador and other countries riven by war and oppressive regimes to come to grips with that history.

“This refusal to speak about it is transitory,” she said. “Sooner or later we have to face it. We have to reach inside ourselves, and inside our people, too. It’s a lot of work, but something great is going to come from it. Maybe I will not be alive to see it.”