They almost made it to the riverbank safely.

Instead, they ended up facedown in the water, the little girl tucked inside her dad’s black T-shirt, her arm around his neck, her legs so short they barely reach his waist.

The father and daughter from El Salvador drowned together on the U.S.-Mexico border this week, the tragedy captured by photographer Julia Le Duc, whose photo of them was first published in Mexican newspaper La Jornada before it circulated widely on social media.

For many, the wrenching photo recalled the image of a 3-year-old Syrian boy who lay lifeless on a beach in a doomed attempt to reach Europe in 2015. The photograph of Alan Kurdi triggered calls for reform and fueled sympathy for migrants when they were at the heart of a bitter debate in Europe.

Many on social media wondered whether the image of the drowned father and daughter would do the same in the United States, which is grappling with its own deep divisions over migration at its southern border.

La Jornada identified the pair as Óscar Alberto Martínez Ramírez and his 23-month-old daughter, Valeria. The Associated Press reported that they crossed the Rio Grande on Sunday. Martínez’s wife, Tania Vanessa Ávalos, who was also trying to reach the United States, watched in horror as a current swept them down the river.

“He put her in his shirt, and I imagine he told himself, ‘I’ve come this far’ and decided to go with her,” Rosa Ramírez, Martínez’s mother, told the AP.

The image of their bodies floating by tall grass on the banks of the Rio Grande, the river that runs along the U.S.-Mexico border, drew attention to the perilous migrant journey through Central America the same week that a debate broke out in the United States over the treatment of migrants at U.S. Customs and Border Protection facilities.

When Alan drowned during his family’s attempt to reach safety, a similar debate was unfolding in Europe. And like Valeria, Alan’s small body was found facedown, his hands by his sides, his tiny sneakers still on his feet.

As the photo of Martínez and his daughter circulated Wednesday, it was too early to tell what impact it could have on U.S. policies or the rhetoric surrounding the immigration debate.

But researchers and volunteers working with migrants and refugees in Europe said the photo of Alan marked a significant turning point in the international debate over what to do with an influx of migrants and refugees seeking safe haven in Europe. The photo also had an impact in Canada. Alan’s aunt lived in British Columbia and had hoped to bring the family there. Some of his relatives reached Canada months later.

Gorden Isler, voluntary chairman of Sea-Eye, a group that conducts rescue missions in the Mediterranean, said one of its ships is named after Alan. In a phone call Wednesday with The Washington Post, he said he saw an uptick in volunteers in the aftermath of Alan’s death, with many of them citing the image as what prompted them to begin volunteering with migrants and refugees in Europe.

Lin Proitz, associate professor at Ostfold University College in Norway, researched the effect the photo of Alan had on young residents of two European cities, Oslo and Sheffield, and saw parallels between that photo and the one of Martínez and his daughter.

The photos were both visually similar and appeared during a cycle of “fierce immigration policies, socio-economical bias, violence, corruption and poverty,” Proitz said in an email. She and other researchers found that the image of Alan’s body “changed the debate” over the European refugee crisis.

Like Isler, Proitz also noticed a surge “in the numbers of people who wanted to volunteer and donate” after the photo of Alan published, in addition to a shift in public rhetoric. For example, people who once called refugees “migrants” began more frequently calling them “individuals fleeing from war and terror. "

Farida Vis, director of the Visual Social Media Lab and professor of Digital Media at Manchester Metropolitan University that published a rapid response report at the time, said the photo of Alan had such an impact because “you could see instantly that something wasn’t quite right, but the way he looked and the way he was dressed meant that he could be anybody’s child.”

Vis said it is too early to predict whether the photo of the Salvadoran father and daughter will have an effect on the political debate over migration to the United States.

If Alan’s case is any indication, it is unlikely.

Despite the immediate and visceral outrage at the photo of Alan and the sudden attention to the suffering of refugees that it provoked, European governments proceeded to close their borders and scale back rescue missions in the Mediterranean — a move volunteers have decried as an inhumane effort at deterrence. More than 10,000 people have died trying to reach Europe since 2015. And although arrivals to Europe by sea have dropped dramatically over the past few years, for those who do choose to make the journey, it has only become deadlier. Italy has moved ahead with efforts to ban private rescue operations at sea.

“Neither Germany nor the other [European Union] member states live up to their sea rescue responsibilities — four years after Alan Kurdi’s death,” Luise Amtsberg, a member of the German parliament for the Green party wrote in a statement. “To the contrary: The situation has even gotten significantly worse since.”

Isler, who organizes volunteer rescues at sea, was pessimistic that the photo published this week would have a long-term impact that transcends political divides in the United States.

“Politicians will once again express sorrow,” he said. Whether it will trigger a change in policy is harder to predict.

Noack reported from Berlin.

This story has been updated.