A craftsman works beside an effigy of Donald Trump before it is burned during an Easter ritual in Mexico City's La Merced neighborhood on March 26, 2016. (Henry Romero/Reuters)

The rise of Donald Trump and the anti-immigrant wave he is riding in his presidential primary campaign have alarmed the Mexican government so much that it has reshuffled top diplomats and, according to officials, adopted a new strategy — to defend the image of Mexicans abroad.

Trump has consistently targeted the United States’ southern neighbor, calling Mexican ­border-crossers “rapists” and criminals and threatening to cut off the money they send home to their families unless Mexico pays for a border wall. But for months, the Mexican government has opted to remain quiet, with a few high-profile exceptions, rather than publicly challenging Trump’s claims.

Under mounting domestic pressure, Mexican officials now say they have chosen a new strategy: to stand up for Mexicans and defend the reputation of their countrymen living in the United States.

“In recent months, we have seen a growing anti-immigrant discourse in general, anti-Mexican in particular, and not exclusively from Donald Trump,” said a Mexican official who was not authorized to speak publicly on this issue. “This set off our fear that it would damage the image of Mexico in the United States.”

From the start of his campaign, Republican presidential candidate Donald Trump has been promising that he will build a wall on the U.S.-Mexico border, and that Mexico will pay for it. Not if these men have anything to say about it. (Sarah Parnass/The Washington Post)

After just seven months on the job, Miguel Basáñez Ebergenyi, Mexico’s ambassador to Washington, will be replaced by Carlos Manuel Sada Solana, the consul general in Los Angeles. Paulo Carreño King, a top aide to President Enrique Peña Nieto whose portfolio has included dealing with the foreign media and improving the country’s brand, will take over as the senior Foreign Ministry official responsible for North America.

The United States is Mexico’s biggest trading partner, with more than $1 billion in bilateral trade each day, and millions of Mexicans live north of the border. The Mexican government is worried that Trump’s rhetoric and wider anti-Mexican sentiment could hurt foreign investment and tourism and lead to damaging U.S. policies in the future.

Foreign Secretary Claudia Ruiz Massieu told El Universal newspaper on Tuesday that the government must “reevaluate our performance and strategy toward the United States.”

“We see an exacerbated mood, in some sectors, against our countrymen, against our country,” she added. “There is a fear on the part of our community in the United States that this spirit can grow and overflow and may generate hostilities."

As Trump’s stature grew at home in recent months, Mexican officials conducted public opinion polling in the United States and spoke with their network of consulates. The outreach, they said, raised new worries about the scope of anti-Mexican feeling.

“We found young people have begun to adopt arguments that are anti-Mexican,” the official said.

Now the government hopes that its diplomats can make a more forceful argument about the benefits that Mexico provides to the United States.

Basáñez took over the Mexican Embassy last year after serving as a professor at the Fletcher School at Tufts University. In his brief tenure, he earned a reputation as a low-profile leader who was restrained amid the Trumpian storm. Last year, he played down Trump’s comments as “just part of the primary campaign” and reportedly argued that attacking the Republican presidential front-runner would serve only to elevate him. Basáñez could not be reached for comment.

Sada, the incoming ambassador, pending confirmation, has served in several Mexican consulates, including in Chicago, San Antonio and New York. He has also been the head of congressional affairs at the Mexican Embassy in Washington.

Arturo Sarukhán, Mexico’s ambassador to the United States from 2007 to 2013, said Mexico must rebut Trump’s claims. The new strategy is a “very welcome tack,” he said.

“There is a clear need for the Mexican government to do something about this, and there was intense domestic pressure on this front,” Sarukhán added. An ambassador’s job, he said, should be to “counter lies, distortions and negative narratives with hard data and facts.”

Read more:

Mexico’s top diplomat calls Trump’s policies ‘ignorant and racist’

Mexico’s miserable year

Today's coverage from Post correspondents around the world