Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

JERUSALEM — Israel’s prime minister has sidestepped a demand by Mexico to apologize for a tweet that allegedly praised President Donald Trump’s plans to build a wall on the Mexican border.

Israeli Prime Minister Benjamin Netanyahu. BAZ RATNER / POOL / EPA

Benjamin Netanyahu on Tuesday reiterated previous explanations that he wasn’t referring explicitly to ties between the United States and its southern neighbor — a justification rejected as insufficient by Mexico.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I did point out the remarkable success of Israel's security fence," Netanyahu said at a cybersecurity conference in Tel Aviv. "But I did not comment about U.S.-Mexico relations. We've had, and will continue to have, good relations with Mexico."

The tweet that drew Mexico’s ire was sent by Trump on Saturday.

President Trump is right. I built a wall along Israel's southern border. It stopped all illegal immigration. Great success. Great idea — Benjamin Netanyahu (@netanyahu) January 28, 2017

Netanyahu said Monday said he had been referring to Trump's praise for the barrier Israel constructed along the Egyptian frontier, which has largely halted the influx of African migrants.

But Mexican Foreign Minister Luis Videgaray replied it was obvious Netanyahu had been commenting on the U.S.-Mexican relationship. "I think an apology ... would be appropriate in this case," Videgaray said, while noting that Israel was a "close friend" of Mexico.

Israeli President Reuven Rivlin planned to phone Mexican President Enrique Peña Nieto later in the day "to stress the importance of the relationship between their two countries," a source close to him said.

The source declined to comment on whether Rivlin, whose post is largely ceremonial, would formally apologize to Mexico on behalf of Israel.

Trump's planned border wall, along with his threat to impose punitive taxes against Mexico to rebalance trade, has brought about the worst crisis in bilateral relations for decades.