President Donald Trump has authorized the deployment of National Guard troops to the US-Mexico border.

It would not be the first such deployment, but it has drawn the ire of Mexican citizens and lawmakers.

Trump has long railed against Mexico, and critics on both sides of the border say that harming the relationship hurts the US.

In the wake of President Donald Trump's directive to deploy National Guard troops to the US-Mexico border, senators in Mexico are calling on their government to retaliate by cutting off cooperation on security and immigration issues.

In a nonbinding resolution approved unanimously on Wednesday, senators said they condemned Trump's "baseless and offensive comments about Mexico and Mexicans and demand the treatment that the relationship between neighbors, partners, and allies requires."

Lawmakers rejected "categorically the intention of President Donald Trump to militarize the border with Mexico and consider such action one insult more."

Trump and Mexican President Enrique Peña Nieto. REUTERS/Henry Romero

They urged Mexican President Enrique Pena Nieto "to suspend the bilateral cooperation with the United States of America on matters of migration and the fight against transnational organized crime as long as President Donald Trump does not conduct himself with the civility and the respect that the people of Mexico deserve."

The motion also called on the US Congress to urge Trump "to direct relations with Mexico on the basis of respect and mutual collaboration" to confront shared challenges and foster prosperity and development.

Laura Rojas, a member of the National Action Party who leads Mexico's senate's foreign-relations committee, expressed support for the motion, saying Trump's conduct had been "permanently and systematically not only disrespectful but insulting, based on prejudices and misinformation and making frequent use of threats and blackmail."

The Trump administration plans to work with four states in the US's Southwest to deploy the troops, who will not be armed or involved in law enforcement, Reuters described Homeland Security Secretary Kirstjen Nielsen as saying.

The Mexican Senate's motion is not likely to lead to policy changes. Its passage was followed by a statement from Mexico's Foreign Ministry, saying it would stay in close contact with the Department of Homeland Security about the deployment.

Signs that say "Racism is not commerce" in Spanish at a protest against NAFTA renegotiations. (AP Photo/Marco Ugarte)

In a rare display of agreement, Mexico's four main presidential candidates issued statements condemning the decision to send troops to the border.

"No to the militarization of the border, nor to the wall," Andres Manuel Lopez Obrador, the leftist frontrunner, tweeted. "Yes to mutual respect and cooperation for development."

Jose Antonio Meade, the candidate for the governing Institutional Revolutionary Party, said in a tweet directed at Trump that "sending your army to the border will be an unacceptable offense for our country."

Margarita Zavala, an independent candidate, said that despite differences on display in the campaign, "we speak with one voice and we demand respect."

Ricardo Anaya Cortes, running for the National Action Party, said Mexico should condition cooperation with the US on "ending attacks against Mexicans, suspending the sending of troops to the border, and the end of the threats."

'Trump risks cutting off his nose to spite his face'

Trump has criticized Mexico since launching his presidential campaign in 2015. For much of that period, critics on both sides of the border have condemned his attacks and described how Mexico could respond.

Immigration and security are two areas where Mexico could cut off joint efforts with the US, undercutting US security interests.

Some prominent Mexicans have previously called on their government to sue the US seeking reparations and indemnification over territory lost in the Mexican-American War in the 1840s.

Mexico also has financial leverage that some have encouraged it to use. Early last year, activists organized a campaign to get Mexico to stop buying corn from the US, a measure that could hit the wallets of many farmers in states Trump won in the 2016 election.

Mexican officials have also said their government could respond in kind to any tariffs Trump levies on Mexican products.

John Kelly, the Homeland Security secretary at the time (in the blue shirt in the center), in Mexico's Guerrero state in July 2017. Mexican Defense Secretariat/Twitter

Security matters, particularly anti-drug efforts, are perhaps the most prominent issue on which the two countries cooperate.

The Mexican government recently allowed the US military to observe opium-eradication efforts for the first time in at least a decade — a decision that was followed by a visit to opium-growing regions in July by John Kelly and Mike Pompeo, then the Homeland Security chief and the CIA director, respectively.

Endangering joint anti-drug efforts is particularly perilous for Trump, according to Rebecca Bill Chavez, a former deputy assistant secretary of defense for Western Hemisphere affairs.

"In jeopardizing counternarcotics collaboration, President Trump risks cutting off his nose to spite his face," Chavez said in February. "I mean, this is a policy priority for Trump ... The US supply-side approach requires Mexican assistance and collaboration."