MEXICO CITY — Before he was president of Mexico, Andrés Manuel López Obrador had a lot to say about President Trump’s plans for a border wall.

The wall was “an attempt to strong-arm and humiliate Mexico that is unacceptable and incompatible with international law,” he wrote in a Washington Post op-ed in 2017.

The wall “goes against humanity,” he said in a speech in Los Angeles the same year.

But since being elected last July, López Obrador’s tone has changed dramatically. This week, as Trump’s push for the barrier reached a peak with a national television address, Mexico’s president was reluctant even to utter the syllable.

“I don’t even want to mention the word,” he told reporters Tuesday. “It’s an issue that’s not even on our agenda. I don’t think about it.”

López Obrador has shown similar caution in response to Trump’s other provocations, including a planned change to U.S. asylum policy that would force asylum seekers to remain in Mexico while their cases are reviewed. AMLO, as he is known, seems determined to be seen as focused largely on domestic politics while viewing U.S. flash points such as the border wall as distractions.

“AMLO will have to respond at some point, but he’ll do so calmly,” said Esteban Illades, an author and political analyst. “He understands that a shouting match with the world’s loudest person will only end in defeat.”

Before being elected, López Obrador’s criticism of the wall was couched in terms of national pride. He denounced his predecessor, Enrique Peña Nieto, for not taking a stronger stance against Trump. He declared that he could persuade Trump not to build the wall, “that it’s not necessary,” as he said in Tijuana last February.

At a news conference Wednesday, López Obrador articulated his administration’s hope that it could work with Trump on development projects that would eventually deter migration.

“We are persuading, convincing, the U.S. government that the best thing is to develop Central America [and] Mexico,” he said. “That migration becomes a choice, not an obligation. That is our policy.”

López Obrador’s sudden diplomatic shift hasn’t raised many eyebrows in Mexico, where, despite opposition to Trump and the wall, the population is much more concerned with a range of domestic issues.

“Mexicans aren’t really worried about the wall in general,” Illades said. “President Trump’s Tuesday speech went largely unnoticed in Mexico because people here are much more worried about the gas shortage in a large part of the country.”

That has left former Mexican officials, including former president Vicente Fox, to speak out on behalf of Mexico’s opposition to the wall and to criticize López Obrador for not lashing out against Trump.

“Way to defend Mexico and Mexicans!!!” Fox said sarcastically to López Obrador in a tweet after López Obrador said Trump’s threat to close the border was an internal issue for the United States.

Last month, when the United States announced that it would implement the new “Remain in Mexico” policy, some members of López Obrador’s administration expressed frustration and surprise. But López Obrador said nothing about the plan.

In an interview last week, the director of Mexico’s National Migration Institute, appointed by López Obrador, cast doubt on the feasibility of the new policy.

“We don’t have the judicial tools or the operational conditions, and there’s no evaluation of the policy’s impact,” Tonatiuh Guillén said.

But López Obrador, in Wednesday’s news conference, instead sought to take the long perspective on U.S. politics. Each presidential term, he said, is “very short.”

“So when a new president takes office, almost as soon as they take power they’re already thinking about reelection, and their opponents are doing the same,” he said.