Lopez Obrador's spokesman Jesus Ramirez said the image was an example of the National Guard doing its job of looking after public security.
Mexico: Lety Perez fell to her haunches, a clenched hand covering her face as she wept, an arm clutching her small six-year-old son, who glared defiantly at the Mexican National Guard soldier blocking them from crossing into the United States.
The plight of this mother and son who had travelled some 1,500 miles (2,410 km) from their home country of Guatemala to the border city of Ciudad Juarez, only to be stopped mere feet from the United States, was captured by Reuters photographer Jose Luis Gonzalez as twilight approached on Monday.
"The woman begged and pleaded with the National Guard to let them cross ... she wanted to cross to give a better future" to her young son Anthony Diaz, Gonzalez said. The soldier, dressed in desert fatigues, an assault rifle slung over his shoulder, said he was only following orders, according to Gonzalez.
The soldier did not disclose his name.
Asylum-seekers gathered in Nuevo Laredo, across the border from Texas, grappled to understand what a new US policy that all but eliminates refugee claims by Central Americans and many others meant for their bids to find a better life in America.
One of several images Reuters published of the scene, the photo was picked up widely on social media. It has thrown into the spotlight the role Mexico's militarised National Guard police force is playing in containing migration, mostly from Central America.
President Andres Manuel Lopez Obrador created the National Guard to bring down record homicide rates, but almost a third of its members are now assigned to patrolling the border to placate President Donald Trump's demands of stemming the flow of US-bound migrants.
The soldier displayed no overt aggression during the nine-minute encounter with Perez and her son. Still, the power dynamics apparent in the image resonated with criticism of the treatment migrants are receiving during the clampdown by Mexico.
Former Mexican President Felipe Calderon, who retweeted the picture after it was posted by former Mexican ambassador to the United States Arturo Sarukhan, wrote "what a pity, Mexico should never have accepted this."
Lopez Obrador's spokesman Jesus Ramirez said the image was an example of the National Guard doing its job of looking after public security. He said the soldier did not impede Perez from crossing, but advised her of the dangers of doing so.
"The Guard combats the crime of people trafficking and protects the human rights of the population and of the migrants crossing the country," Ramirez said.
An official with the National Guard said the soldier "invited her to avoid putting herself at risk by crossing the river with a minor."
In June, Lopez Obrador said the National Guard did not have orders to detain migrants crossing the US border. He regularly emphasizes that the clampdown must not violate rights.
Migrant apprehensions on the US southern border fell in June by roughly a third to about 100,000 people, according to US data, after Mexico deployed to its borders some 21,000 National Guard troops, largely drawn from the ranks of the military.
Trump said on Wednesday that Mexico will "probably put up more" troops to its US border. Mexico's foreign ministry did not immediately respond to a request for comment.
The National Guard troops in Ciudad Juarez, including the soldier in the photo, are equipped with ballistic helmets, body armor and rifles. They are identifiable by small armbands emblazoned with the letters GN, for the Spanish words for "National Guard."
Gonzalez said he was making his daily round alongside the dry riverbed of the Rio Grande that separates his native Ciudad Juarez from El Paso, Texas, when the guards apprehended a handful of migrants, including the mother and son duo, on a dusty, dirt road overlooking the river.
That is where she made her tearful plea.
"Her face, that's a small reflection of all migrants' suffering," said Gonzalez. "A lot of people judge migrants, ask why don't they stay in their country, why do they come here or why are they crossing into the United States. ... Every migrant has a story."
All of a sudden, seizing the opportunity when the battle-ready soldier glanced away, Perez lunged into the shrubs growing on the side of the river bank, pulling her son with her. They quickly ran across to the other side of the river and out of the guardsmen's jurisdiction where US Customs and Border Protection agents took them into custody.
In response to a request for information, a spokesman said US Customs and Border Protection did not have the resources needed to track the current whereabouts of Perez and her son based on the details Reuters was able to provide.
Depending on the particulars of the case, the two would typically be processed at a Border Patrol station and then handed to Immigration and Customs Enforcement, or put into a program that returns some migrants to Mexico to await US court hearings, said the spokesman, who asked not to be named.