Mexico’s Foreign Ministry called out Israel for a tweet by Prime Minister Benjamin Netanyahu seen as supporting U.S. President Donald Trump’s plan to build a wall with Mexico to keep out illegal immigrants.

“President Trump is right,” Netanyahu said on Twitter on Saturday morning. “I built a wall along Israel’s southern border. It stopped all illegal immigration. Great success. Great idea.” The tweet featured American and Israeli flag icons. The White House later retweeted the message.

“The Foreign Ministry expressed to the government of Israel, via its ambassador in Mexico, its profound astonishment, rejection and disappointment over Prime Minister Netanyahu’s message on Twitter about the construction of a border wall,” the Mexican Foreign Ministry statement said.

“Mexico is a friend of Israel and should be treated as such by its Prime Minister.”