Salvadoran President Nayib Bukele accepted blame Monday for the deaths of a migrant father and daughter who drowned last month trying to cross the Rio Grande.

Óscar Alberto Martínez and his 23-month-old daughter Angie Valeria's deaths went viral when journalist Julia Le Duc captured a photo of their bodies facedown on the shore of the Mexican side of the river. They drowned trying to reach the United States.

"People don't flee their homes because they want to, people flee their homes because they feel they have to," Bukele told the BBC. "Why? Because they don't have a job, because they are being threatened by gangs, because they don't have basic things like water, education, health."

El Salvador's President Nayib Bukele. (Marco Ugarte/AP)

"We can blame any other country but what about our blame? What country did they flee? Did they flee the United States? They fled El Salvador, they fled our country. It is our fault," he continued, before adding that migration "should be an option, not an obligation."

Bukele also condemned the United States' treatment of migrants in the country, which was a source of contention following their deaths.

Even those of us who didn’t vote for this cruel psychotic in the White House — what are we going to do?



I don’t know. I wish I did.



Óscar Alberto Martínez Ramírez and his daughter Valeria wouldn’t have attempted that river crossing if we had a sane and moral asylum policy. 12/ pic.twitter.com/B2pPYp4PtS — Anthony Breznican (@Breznican) June 26, 2019

“Very regrettable that this would happen,” Mexican President Andrés Manuel López Obrador said last week in regards to the photo. "We have always denounced that as there is more rejection in the United States, there are people who lose their lives in the desert or crossing [the river.]"

This is the picture of Oscar Alberto Martinez Ramirez and his 23-month-old daughter Valeria Ramirez. They are talking about it right now during the #DemDebate and you, Mr. President, are responsible for their deaths. This is inhumane and a stain on our country. pic.twitter.com/VgMUKII0kV — Eugene Gu, MD (@eugenegu) June 27, 2019

The Associated Press reported that there were 283 migrant deaths recorded in the 2018 fiscal year, which was down from the previous two years.