German Chancellor Angela Merkel on Saturday indirectly criticized US President Donald Trump's plans to build a wall on the US-Mexico border to stop illegal immigration.
Building a wall won't solve the problem, Merkel said, adding that it's more important to address the reasons why people flee.
Merkel, who is on a three-day trip to Latin America that has already taken her to Argentina, spoke in Mexico City at a business forum with Mexican President Enrique Pena Nieto.
Trump has pledged to build a wall along the more than 3,000-kilometre border with Mexico to stop illegal immigration and the flow of illegal drugs. He also has promised supporters to force Mexico to pay for the construction.
The Mexican government has flatly rejected the idea.
Merkel acknowledged the problem of smugglers and human traffickers and said they must be fought.
"That is a big challenge, but it won't be possible to solve those problems through improvements to border constructions," Merkel said. Long stretches of the border already are marked by a high fence.
Citing historical examples in ancient China and Rome, Merkel said large empires were successful only when they managed to build reasonable relationships with their neighbours and regulate population movements.
Every year tens of thousands of people from Latin America try to enter the United States illegally through Mexico. Many are fleeing violence in Central America.
Merkel also called for openness in economic relations.
"We feel duty bound to the same principle that open and fair trade to everyone's advantage," she said. "Economic cooperation is one of the most important pillars of our bridge of cooperation."
More than 1,900 companies registered in Mexico are backed at least in part by German investors. These include Volkswagen, BASF and Bayer. Together they employ about 120,000 people and comprise about 8 per cent of Mexico's gross domestic product.
The German chancellor also spoke with human rights advocates and journalists during her two-day stay in Mexico.
A government spokesman said the conversation centered on the state of human rights in Mexico, threats against journalists, violence in general and the fight against sexual violence in particular, a government spokesman said.
Mexico, which has a population of about 123 million, is one of the most dangerous countries in the world. Last year more than 20,000 people were murdered and about 30,000 people went missing. Capital crimes are only seldom solved, and investigative journalists repeatedly find themselves in the sights of corrupt politicians and criminal gangs. Seven have been killed since the beginning of the year.
Representatives of civil society are demanding Merkel push for measures to fight corruption in negotiations on a global treaty between the European Union and Mexico.
Merkel promised to raise her voice for the victims and for those who fight for justice, said Abel Barrera, founder of the human rights centre Tlachinolan, after the meeting.