Israel's president has told his Mexican counterpart that he "regretted the misunderstanding" over a tweet in which Prime Minister Benjamin Netanyahu appeared to praise US President Donald Trump's plans to build a wall on the Mexican border.
In a tweet on Saturday that drew a rebuke from Mexico, the right-wing Netanyahu wrote: "President Trump is right. I built a wall along Israel's southern border. It stopped all illegal immigration. Great success. Great idea."
Netanyahu had earlier sidestepped Mexico's demand for an Israeli apology and echoed previous Israeli explanations - rejected as insufficient by Mexico's foreign minister on Monday.
"I regret any offence that was caused from this misunderstanding but it is important to note that this was only a misunderstanding and I am certain that we can put the matter behind us," a statement from President Reuven Rivlin's office said in a statement directed at Mexico.
Rivlin's post as president is largely ceremonial and the long statement appeared to stop short of a full apology that Mexico had called for.
"I think an apology ... would be appropriate in this case," Foreign Minister Luis Videgaray said following Netanyahu's tweet, while noting that Israel was a "close friend" of Mexico.
Netanyahu, in public remarks on Monday, said he had been referring to Trump's praise for the barrier Israel constructed along the Egyptian frontier, a fence with electronic sensors that has largely halted the influx of African migrants.
"I did point out the remarkable success of Israel's security fence. But I did not comment about U.S.-Mexico relations," Netanyahu said.
"We've had, and will continue to have, good relations with Mexico."
Trump's planned border wall, which he says will keep out illegal immigrants, along with his threat to impose punitive taxes against Mexico to rebalance trade, has brought about the worst crisis in bilateral relations for decades.
Political commentators and opposition politicians in Israel said Netanyahu's tweet had needlessly thrust Israel into the US-Mexican feud.