MEXICO CITY (AP) — Mexican officials have copied a page from President Donald Trump's playbook in recent days, taking to Twitter to communicate that they are working flat-out to de-escalate tensions over immigration and avoid punitive tariffs on all Mexican exports to the U.S.

Announcements of meetings in Washington, selfies and carefully crafted messages of optimism for cool-headed discussions are some of the tactics on display in social media to respond to an economic and diplomatic emergency that few anticipated. Trump's threat on Thursday to impose tariffs to pressure Mexico to do more to curb the flow of migrants came the same day that Mexico declared it would begin the process of ratifying the new United States-Mexico-Canada Agreement on trade.

Many are questioning the legality of mixing immigration policy goals with trade retaliation, and U.S. business groups are already considering legal action against the proposed tariff, arguing that the countries both produce for each other and together.

"Almost everyone was caught flat-footed," said Antonio Ortiz-Mena, an international trade consultant based in Washington with the Albright Stonebridge Group who represented Mexico as part of the team that negotiated the North American Free Trade Agreement in the early 1990s.

Ortiz-Mena said he spent much of the weekend on phone calls and crafting strategies to advise clients in the U.S.-Mexico supply chain on how to navigate the situation. His advice to Mexican officials would be to stay calm and show good faith by ratifying the USMCA trade deal.

"We're neighbors. We're not going anywhere," Ortiz-Mena said.

Mexico overtook Canada to become the top trade partner for the U.S. in April.

Mexico's message has been consistently friendly. President Andrés Manuel López Obrador said Mexico won't panic, signing off on a letter to Trump as "your friend" and repeating that his country doesn't want this confrontation, much less a trade war.

But on Monday, his top officials also strove to set some boundaries.

Story continues

"There is a clear limit to what we can negotiate, and the limit is Mexican dignity," said Mexico's ambassador to the United States, Martha Bárcena, at a news conference in Washington. She added that her country has taken steps to offer migrants visas, and said that "without Mexico's efforts, an additional quarter million migrants could arrive at the U.S. border in 2019."

Foreign Relations Secretary Marcelo Ebrard said that any "safe third country" agreement that would require asylum seekers to apply for refuge in Mexico first would be unacceptable for Mexico.

There has also been some expert trolling. Ebrard posted a picture of himself at a Mexican airport Friday waiting to depart for Washington via Houston, with a Huawei-branded cellphone charging station behind him. The subtle implication: If the U.S. pushes Mexico away, China, a geopolitical and economic adversary, could move in to fill that space.

Mexican Economy Minister Graciela Marquez said she would meet with Commerce Secretary Wilbur Ross in Washington on Monday. Ebrard said a delegation he is leading will hold talks Wednesday with one headed by Secretary of State Mike Pompeo.

Ebrard said Mexican Agriculture Minister Victor Manuel Villalobos also is to meet with his U.S. counterpart, Sonny Perdue, as tariffs would "severely" affect the U.S. agricultural sector. The objective is for the U.S. to avoid "shooting itself in the foot," Ebrard said.

Mexico is the top export market for U.S. corn and pork, and Mexico supplies one out of three fresh fruits and vegetables consumed in the United States. Tariffs on Mexican agricultural exports are seen raising the cost of avocados, tomatoes and berries for U.S. consumers.

Over the weekend, Mexico's economy minister joined what Mexican Twitter users have dubbed the "Ebrard Selfie Challenge," posting pictures of herself smiling next to the U.S. commerce secretary at the inauguration of El Salvador President Nayib Bukele.

The Mexican strategy of killing with kindness has been met with skepticism and increasingly harsh words from Trump.

"Mexico is sending a big delegation to talk about the Border," Trump tweeted Sunday. "Problem is, they've been 'talking' for 25 years. We want action, not talk."

That followed an earlier tweet in which Trump labelled Mexico an "abuser" that takes but never gives to the U.S. He threatened to lure U.S. companies and jobs back via tariffs unless Mexico stops what he called an "invasion" of drug dealers, cartels, human traffickers, people smugglers and immigrants.

The addition of drugs to the complaint adds another layer of complication to negotiations.

"It's asking the impossible," said Maureen Meyer, director for Mexico and migrant rights at the Washington Office on Latin America, a group that researches and advocates for human rights. "It certainly overlooks how much Mexico is trying to cooperate with the U.S."

Mexican authorities have raided migrant caravans traveling through the country's southern states of Chiapas and Oaxaca this year. They have deported thousands of migrants and frustrated thousands more who wait endlessly for permits that would allow them to travel legally through Mexico.

Meyer expects U.S. officials will again push this week for Mexico to sign onto a "Safe Third Country" agreement, which would designate Mexico as an adequate waiting spot for migrants wishing to claim asylum in the U.S. She said Mexico should stand firm and resist because it lacks the financial and human resources to process thousands of refugee cases, even if it were willing to do so.

A complete militarization of Mexican borders is also a very tall order. Just as the Mexican border with the U.S. has proven porous, Mexico's southern border with Guatemala features dense jungle and a river that makes it difficult to patrol.

Over the weekend, The Associated Press witnessed migrants arrive in small batches by raft at Tapachula, a border town in Chiapas. Federal helicopters, boats and police were not patrolling the Suchiate River as they have in the past to halt caravans.

But the AP also has seen a migrant woman and two children pulled from a bus in recent days to be transported to a detention center. Residents of Tapachula are routinely asked to show ID while riding public transportation as officials search for migrants without permission to be in Mexico. There were few migrants in the streets or camping in the public parks of Tapachula.

Those passing through Mexico without transit visas have opted to maintain a low-profile over the past weeks as Mexico seeks to detain and deport more migrants — and to draw attention to those efforts.

The National Migration Institute tweeted a picture Saturday of a plane transporting 64 Cubans back to their country from the Gulf state of Veracruz.

Trump says he will impose a 5% tariff on Mexican goods beginning June 10 as a way to force the government of Mexico to keep mostly Central American migrants from crossing into the U.S. He says that until he is satisfied with Mexico's results, the import tax will be increased five percentage points every month through October, topping out at a total tariff of 25%.

Yet there are no concrete benchmarks for Mexico to prove that it is stemming immigration flows.

Mick Mulvaney, acting White House chief of staff, said on "Fox News Sunday" that Trump is "deadly serious" about imposing tariffs on imports, adding that "there's no specific target, there's no specific percentage" that Mexico needs to hit.

"They have to get dramatically better and they have to get better quickly," Mulvaney said.

López Obrador said Mexican officials will try to better communicate their immigration efforts in Washington this week. He issued a memo to "the people" of the U.S. on Sunday saying he wishes to remain Trump's friend and professing that Mexicans are their friends, too.

He closed the letter by saying: "Let nothing and nobody separate our beautiful and sacred friendship."

___

Associated Press photo journalist Marco Ugarte in Tapachula, Mexico, contributed to this report.