Mexico's President Andres Manuel Lopez Obrador has called on Latinos in the United States not to vote on U.S. politicians who have "mistreated them" as the November midterm elections near.

Lopez Obrador's statement came as a response to a comment by former U.S. President Donald Trump, according to a Reuters report.

Trump noted at a rally in Ohio at the weekend while in office, that he had forced Lopez Obrador to deploy 28,000 soldiers along the U.S.-Mexico border to keep out migrants after posing a threat to put tariffs on Mexican goods.

Lopez Obrador said that no U.S. political party should "use Mexico as a pinata," adding that those with the right to vote should exercise it with caution.

The Mexican president said that Americans of Mexican and Latino descent should not vote for parties of candidates if Mexico or some country in Latin America and the Caribbean is "mistreated."

Lopez Obrador said in a news conference not to forget their origins, adding that when someone goes too far and causes offense, the Latinos will call them out.

In 2017, it was recorded that Mexicans made up the largest population of Hispanic origin in the United States, which is at 36.6 million.

READ NEXT: Mexico: Lopez Obrador Denies 'Falsifying' Investigation on 2014 Disappearance of 43 Students

Donald Trump and Andres Manuel Lopez Obrador

The former president has called Mexican migrants rapists, threatened Mexico with a trade war, and sent out thousands of asylum seekers out of the country.

Trump has also installed a wall and promised to make Mexico pay for its expenses, according to a The New York Times report.

In 2017, Lopez Obrador likened Trump's attitude toward migrants to Nazi Germany's treatment of Jews. He noted that he "liked Trump even though he is a capitalist," adding that Trump's presidency was good for both countries, according to The National News report.

Foreign Minister Marcelo Ebrard rebuffed Trump's comments. He is seen to succeed Lopez Obrador in 2024.

Ebrard took to Twitter to respond to Trump's remarks, saying that he was "campaigning for the anti-Mexicanism that characterizes him."

Mexico and Immigrants

Mexico is seen as crucial to holding off new waves of migrants, mobilizing extra security forces at its southern border to prepare for its latest caravan.

U.S. President Joe Biden's administration will also need Lopez Obrador's cooperation in creating more COVID testing and tracing for people who cross the southern border.

Lopez Obrador wanted to maintain "a good neighbor policy," while also criticizing his predecessor for being "servile and irresponsible" when it comes to enforcing their sovereignty.

In the 2021 fiscal year, the U.S. Border Patrol reported more than 1.6 million encounters with migrants along the U.S.-Mexico border, according to a Pew Research report.

Migrant encounters refer to two kinds of events such as expulsions, wherein migrants are immediately expelled to their home country or last country of transit. The second one is apprehension, wherein migrants are detained in the United States at least temporarily.

Expulsions have been the most recorded migrant encounters in the United States ever since the COVID-19 pandemic started.

READ MORE: Mexico: 90,000 People Have Disappeared Without a Trace Amid Drug War

This article is owned by Latin Post.

Written by: Mary Webber

WATCH: Trump, Lopez Obrador visit about trade, politics - from Associated Press