MEXICO CITY — Amid the diplomatic showdown over President Trump’s order to build a border wall — and who should pay for it — Mr. Trump and President Enrique Peña Nieto of Mexico spoke by phone on Friday, both leaders said.
The two spoke for about an hour, and both presidents made an effort to say that the call had been productive, suggesting that tensions had cooled, at least publicly.
But they stood their ground on their positions, with no suggestion that the call had resolved their disagreement over fundamental issues.
“With respect to the payment for the border wall, both presidents recognized their clear and very public difference between their stances on this very sensitive issue,” the Mexican president’s office said in a statement. “The presidents also agreed for now to not speak publicly about this controversial issue.”
The standoff with Mexico’s president has been the first full-blown foreign policy clash with a foreign leader for the Trump administration.
After Mr. Trump ordered the border wall to be built, months of tensions between the two men came to a boil this week. On Thursday, Mr. Peña Nieto, who has long urged diplomacy in the face of Mr. Trump’s disparaging comments about Mexico, canceled a meeting with the new American leader.
Mr. Trump quickly fired back, saying that Mexico saddles the United States with criminals, illegal immigrants and unfair trade. On Friday, he repeated the same themes.
“We had a very good call,” Mr. Trump said in a news conference in Washington. “The border is soft and weak, drugs are pouring in, and I’m not going to let that happen.”
“We’re going to be working on a fair relationship and a new relationship,” Mr. Trump said, adding, “We’re no longer going to be the country that doesn’t know what it is doing.”
Mr. Trump said: “I have great respect for the Mexico. I love the Mexican people.”
But “as you know,” he added, Mexico “has outnegotiated us and beat us to a pulp through our past leaders.”
“They’ve made us look foolish,” he said.
During the campaign and now as president, Mr. Trump has taken aim at perhaps the most prized possession of Mexico: its image.
Throughout his presidency, Mr. Peña Nieto has tried to portray his country as a place of economic opportunity, a cultural capital and a nation rising on the world stage.
Mr. Trump has sought to show the opposite, characterizing Mexico as a bastion of crime, illegal immigration and the overwhelming beneficiary of free trade between the two countries.
For months, though his ratings fell to the lowest of any Mexican president in recent history, Mr. Peña Nieto resisted the temptation to saber-rattle, arguing that the relationship with America was simply too important to fall prey to a war of words.
To the growing anger of many Mexicans, he avoided responding rashly to Mr. Trump. Calls for the building of a wall, promises to deport millions and threats to tear up the North American Free Trade Agreement had been met with measured, understated responses.
But once Mr. Trump took office and pushed to make good on his campaign pledge to build a wall, the domestic pressure on Mr. Peña Nieto became too great.
Across the Mexican political and intellectual class, calls for him to cancel the meeting reached a fever pitch this week. Mr. Peña Nieto canceled a meeting with Mr. Trump scheduled for next week, earning him political points at home.
As for what comes next, the Mexican president’s office said on Friday that the two leaders had “agreed to solve these differences as part of an all-encompassing discussion of all aspects of the bilateral relationship.”
“Both presidents have instructed their teams to continue the dialogue to strengthen this important strategic and economic relationship in a constructive manner,” the statement from Mr. Peña Nieto’s office said.