Israel built a more than 240-kilometre (150-mile) barrier along its border with Egypt, a route previously taken by many African illegal migrants and traffickers.
Trump hailed the Israeli wall as an example last week, prompting Netanyahu to express his support for the new US president's plans to build a wall along the Mexican border.
"President Trump is right. I built a wall along Israel's southern border. It stopped all illegal immigration. Great success. Great idea," Netanyahu tweeted yesterday.
Today, Mexico called on Netanyahu to apologise.
More From This Section
"We are expecting a clarification, a rectification. I think that an apology would be something appropriate in this case," Mexican Foreign Minister Luis Videgaray said.
Referring to critics in the media, Netanyahu said: "They say 'you've hurt Mexico, you've ruined the relationship with them.' Who even referred to Mexico? We've had a good relationship with them and we will keep on having one."
The Israeli leader, speaking at a meeting of his rightwing Likud party, accused the media of overplaying the dispute, failing to focus on the "fantastic success" of the fence built in southern Israel to prevent migrants and spreading "fake news".
Since the end of 2016, Netanyahu has been the subject of two police investigations regarding luxury gifts he and his family are alleged to have received and the other concerning meeting with the head of a prominent newspaper to try to negotiate better coverage.
He denies any wrongdoing.