In his recent apostolic exhortation on holiness, Pope Francis invited all of us to seek out the lost, the poor, the destitute and the abandoned. In other words, he invited us to seek out the migrant.

The world is witnessing one of the largest humanitarian crises in history, with an estimated 68.5 million people forced to flee their homes. Some are escaping religious, ethnic or political persecution. Others are fleeing war and gang violence. Some are running away from crushing poverty. Others are leaving droughts and famines brought by climate change. While the reasons for migration are different, there is a universal desire for a better life.

The plight and flight of the poorest and most persecuted raises many questions. Do we send them back to their places of origin, where they could be killed, or do we accept them with compassion and understanding? In seeking solutions, do we focus on the displaced or on the forces that displaced them?

In seeking solutions, do we focus on the displaced or the forces that displaced them?

The United States and Mexico are addressing these questions as migrants flee poverty and gang violence in Central America—with Mexico as a transit country and the United States as the intended destination (though an increasing number are remaining in Mexico). In 2016, 200,000 Central Americans, mainly from Guatemala, Honduras and El Salvador, were apprehended by the U.S. Border Patrol.

This phenomenon led the Trump administration to pursue a policy of separating migrant families on the U.S.-Mexico border as a form of deterrence against unauthorized crossings. While the separations are new, the question of what to do about families is not. In 2014, the arrival of 69,000 unaccompanied minors from Central America became a national story, but more than 60,000 families were apprehended at the border, too. Most were granted entry into the United States to face deportation and asylum proceedings.

That changed this year with the “zero tolerance” immigration policy resulting in the separation of 3,000 children from their parents. The images of young children held in detention centers outraged millions of people around the world, forcing the Trump administration to retract its policy.

Perhaps it is time for a change in strategy.

The United States spends billions each year to remove undocumented migrants, but what if they did not have to flee their homes in the first place? What if the success of an immigration policy were measured in prosperity and security rather than in deportations and detentions? What if the solution lies not in border protection and immigration enforcement but in thoughtful diplomacy and strategic planning?

What if the success of an immigration policy were measured in prosperity and security rather than in deportations and detentions?

Shortly after the immigration crisis of 2014, the Obama administration worked with Congress and foreign diplomats, including those from Mexico, to create the Alliance for Prosperity, a bipartisan, multiyear plan promoting institutional reforms and economic development in Central America. In 2015, Congress approved $750 million in aid to Guatemala, Honduras and El Salvador toward those ends. It was not a panacea, but it was a start in rethinking the way that we address migration.

Unfortunately, this way of approaching migration has lost favor. U.S. foreign aid to Central America has decreased by 20 percent under the Trump administration. The militarization of the border and the dehumanization of those who cross also show a less understanding approach to the most vulnerable people in our hemisphere.

There is another way. The Global Compact for Safe, Orderly and Regular Migration, sponsored by the United Nations, is expected to be the first multinational negotiated agreement to address the challenges associated with migration, including its root causes and the potential for migration to further prosperity and sustainable development in our globalized world. Hearings on the plan have been held since April 2017, and in early July a consensus on the text was achieved at the U.N.’s General Assembly on the founding document of the Global Compact; it is expected to be adopted at a conference on international migration this December in Morocco. Its 23 objectives include “providing basic services for migrants” and using “detention only as a measure of last resort.” The United States had initially participated in the negotiations but withdrew last year.

In the same way that the causes of migration are many, the solutions are too. What works in one country may not work in others, but what will work is a comprehensive, holistic approach, like that of the Global Compact, that considers all parties and all factors. Migrants are incredible resources, and so are the communities from which they come. We must embrace them with kindness and compassion.

Pretending that their struggles are not our own will only lead to greater anguish and suffering. A successful policy cannot be measured in months or years but in decades. It is faster to act through deportations and detentions, but that does not make economic opportunity and security less worthy pursuits.

Mexico understands that migration is more than the journey; it is about cause and effect, and the Global Compact’s global approach will allow the international community to maximize migration’s economic opportunities. We are proud to recognize the humanity of migrants but more important, to work toward building a society where everyone has a fair shot at life.

[Sign up for Convivir, a new newsletter from America Media. Each week, it will highlight news, culture and trends related to Latino Catholics. To receive this important expert analysis in your inbox, sign up here.]

Diego Gómez Pickering served as Mexico’s ambassador to the United Kingdom from 2013 through 2016 and is now the Consul General of Mexico to New York City.