When Óscar Alberto Martínez Ramírez told his mother that he was planning to take his wife and young daughter from their home on the outskirts of the San Salvador and head north to the United States, she felt a shiver of foreboding.

“I had a feeling,” said Rosa Ramírez, 46. “An ugly premonition.”

But Óscar was eager to follow his dream of a better future for his wife Tania Vanessa Ávalos, 21, and their 23-month-old daughter Angie Valeria. The family set out in April, heading for Mexico. “I told him to take it step by step,” Ramírez told the Guardian. “But he got impatient.”

Twelve weeks later, Óscar and Angie Valeria drowned in each other’s arms as they attempted to cross the Rio Grande and reach US soil. A harrowing photograph of the two bodies lying in shallow water cast a harsh spotlight on the region’s migration crisis, and once again underlined the dangers facing families seeking to escape poverty, violence and corruption in Central America.

Rosa Ramírez, mother of Óscar Alberto Martínez Ramírez, said she had ‘an ugly premonition’ when her son said he was taking his family to the US. Photograph: José Cabezas/Reuters

Pope Francis expressed his “immense sadness” at the accident, while in the US, the image turned up the heat on a bitter partisan debate over immigration.

Back at the family’s neatly painted brick house, Ramírez was left struggling with her loss. “I feel a huge emptiness,” she said. A purple stuffed monkey and baby doll that belonged Angie Valeria still lay on a chair in the living room.

The last time she spoke to Óscar was on Saturday, when he called from Mexico. He told her he was fine – as he had in every phone call since they set out. In retrospect, she wonders if he said so only to calm her worries.

The next morning the couple arrived in Matamoros, across the border from Brownsville, Texas, where they attempted to seek asylum at the port of entry. They were turned away and decided to cross the river which divides Mexico from the US. Óscar crossed first with Angie Valeria, then turned back to help Ávalos, but the little girl followed him into the water; Óscar tried to save her, but the current swept them both away.

They were found on Monday, just half a mile (1km) from an international bridge, Valeria tucked inside her father’s T-shirt – presumably in an attempt to stay together. For Ramírez, the photograph is a source of pain but also a measure of comfort.

The bodies of Salvadoran migrant Óscar Alberto Martínez Ramírez and his nearly two-year-old daughter Angie Valeria lie on the bank of the Rio Grande in Matamoros, Mexico. Photograph: Julia Le Duc/AP

“It’s tough … that image. But at the same time, it fills me with tenderness. I feel so many things, because at no time did he let go of her.”

“You can see how he protected her,” she told the Associated Press. “They died in each other’s arms.”

Relatives and neighbours remembered Óscar as a young man who was dedicated to his role as a father and husband.

Unlike many Salvadoran migrants, his decision to migrate was not prompted by the rampant criminality which besets this Central American country. Altamira, the neighbourhood where Óscar and Tania lived, is dominated by a street gang, but locals said that violence had somewhat decreased in recent months.

Both parents had jobs – Óscar had a minimum-wage job at a pizzeria, while Ávalos worked as a cashier in a fast-food restaurant – but the two incomes were just not enough for them to buy a place of their own.

“They went looking for a better life and then this tragedy happened,” said Cecilia Rodríguez, 23, who sells tortillas near the family’s house. Óscar was a regular customer, and would often bring his daughter with him.

At 23 months, Angie Valeria still didn’t talk much, but she was always laughing, Rodriguez said. “When he was off work, I saw that he was always here with his family,” she said.

Moisés Gómez was a childhood friend of Óscar’s; as boys they had spent their time watching videos and listening to music, although the two had seen much less of each other since Angie Valeria’s birth. “I felt bad when I heard,” said Gómez, 22. “He was a friend all my life, so it hurt. And his daughter was so young.”

“We never thought this would happen,” said neighbor Marta Argueta de Andrade, 63, who said Angie Valeria would often stand on the family’s couch propped against the window so that she could wave to Argueta.

Argueta always saw father and daughter together, usually going on walks to the store. “Maybe they should have stayed – but no one knows that when they leave,” she said.

Óscar Alberto Martínez Ramírez and daughter Angie Valeria drowned in each others arms attempting to reach the US. Photograph: handout El Salvadorian authorities

Argueta said that recently her grandson, who just turned 21, has also been thinking of migrating to the US.

“So many leave here because of the desperation and poverty. They can’t find work,” she said. Young men are particularly vulnerable in the gang-controlled neighborhood. “You hear that they’ve killed one person and then another and it makes you scared,” Argueta said.

But now she is just as worried for her grandson to try to go to the US. “With the tragedy that has happened, I would tell him that he shouldn’t go,” she said.

Gómez said he had also been considering leaving for the US.

“I’ve always had the dream of going to the US. and coming back to buy a house and making sure that my mom doesn’t lack anything,” said Gómez. “But after seeing the suffering of this family, not any more.”