WASHINGTON/MEXICO CITY (Reuters) - U.S. President Donald Trump said on Thursday he was referring to criminal gangs when he called some illegal immigrants “animals,” a term the Mexican government labeled as unacceptable and which drew rebukes on social media.

Trump made the remarks on Wednesday during a meeting with California municipal leaders who support his goal of making the U.S. border impervious to illegal immigration.

“We have people coming into the country, or trying to come in, and we’re stopping a lot of them, but we’re taking people out of the country. You wouldn’t believe how bad these people are. These aren’t people. These are animals,” Trump said.

Mexico’s government said it filed a diplomatic note of complaint to the U.S. State Department over the remarks, saying that the comments were not respectful of human rights.

“President Trump referred to some immigrants, perhaps he had criminal gangs in mind, I don’t know, as animals, not as persons,” Foreign Minister Luis Videgaray told local TV station Televisa on Thursday. “In the opinion of the Mexican government, this is absolutely unacceptable.”

Asked about the remarks, Trump said on Thursday they had been taken out of context.

“I’m referring and you know I’m referring to the MS-13 gangs that are coming in. I was talking about the MS-13. And if you look a little bit further on in the tape, you’ll see that,” Trump told reporters.

He also doubled down on his earlier comments.

“MS-13 - these are animals. ... We need strong immigration laws. ... We have laws that are laughed at on immigration. So when the MS-13 comes in, when the other gang members come into our country, I refer to them as animals and guess what, I always will,” Trump added.

Mexico’s Foreign Ministry said later on Thursday that Videgaray’s comments still stood.

SEEKING TO WIN FAVOR

MS-13, which started in Los Angeles in the 1980s, has grown into a cross-border criminal organization with leadership in El Salvador that has 30,000 members worldwide and 10,000 in the United States, the U.S. Justice Department says.

At the meeting on Wednesday, Trump also voiced hostility for Mexico, which will be partnering with the United States and Canada in an unprecedented bid to host the soccer World Cup in all three countries in 2026. It is also part of the North American Free Trade Agreement that Trump has threatened to scuttle if it is not improved to his liking.

“Mexico does nothing for us,” Trump said at the meeting. “Mexico talks but they do nothing for us, especially at the border. They certainly don’t help us much on trade.”

Despite Trump’s comments, Mexico has been working hard to win favor with the Trump administration in areas like diplomacy and migration, in the hopes of garnering a beneficial renegotiated NAFTA deal.

Since 2014, when Democratic President Barack Obama was in the White House, Mexico has been more aggressive with law enforcement on its southern border, detaining and deporting tens of thousands of immigrants, many of whom hail from the poor, violent Central American nations of Honduras, Guatemala and El Salvador.