A war of words has erupted between the United States and Mexico over President Donald Trump’s executive order to build a wall along the border, and his insistence that Mexico foot the bill. When the proposal was first announced during the U.S. election, it prompted an expletive-laden response from former Mexican President Vicente Fox. After the order was signed, Mexican President Enrique Peña Nieto canceled a planned visit to Washington.

My research explores how security interests shape immigration and border policies. In Mexico, migration is viewed as mutually beneficial and a fundamental human right. In the United States, migration is often viewed as a threat. The tension between these two impulses has produced what some Mexican government officials have regarded as a “bittersweet” relationship with the United States.

Do Trump’s policies signal a sea change in U.S.-Mexico relations and in the way the border is managed? Or just another shift in the ebb and flow of border management between the two countries?

Importing Mexican labor

Closer relations between the U.S. and Mexico were achieved during and after World War II. Overlapping security interests led to the creation of the Bracero Program, a bilateral agreement to facilitate the temporary inflow of Mexican labor.

Mexican workers supported U.S. security interests by providing needed labor on the home front while American forces were fighting overseas. It also facilitated the shift of American labor away from agriculture and toward the rapidly growing manufacturing industry after the war.

Between 1948 and 1964, the U.S. imported 200,000 Mexican workers per year on average. Both nations considered the program mutually beneficial.

However, in the 1950s, workers and employers began circumventing the program’s red tape. Levels of undocumented migrants rose sharply and the U.S. response was swift. An Immigration and Naturalization Service program, pejoratively dubbed “Operation Wetback,” led to the deportation of more than one million Mexican migrants. This infuriated the Mexican government, which saw this as an overly heavy-handed response that neglected the economic contributions of Mexican workers on the U.S. economy.

Relations were further strained in 1964 when the United States unilaterally scuttled the Bracero Program when policymakers felt it no longer served American interests.

A growing partnership

Interest in cooperation rose again during the 1990s. Notions of free trade and integration served as the cornerstone of economic security interests for both the U.S. and Mexico.

Ironically, growing concerns about illegal immigration kept migration largely out of the North American Free Trade Agreement (NAFTA), but the issue played a role in generating political support for the agreement. Some NAFTA proponents in the U.S. suggested economic growth from NAFTA would curb emigration pressures in Mexico. This logic contributed to NAFTA’s passage.

After ratification, NAFTA served to define the relationship between the United States and Mexico in unequivocally positive terms: They were “partners.”

This new era of partnership fostered increased cooperation on migration and border management, such as the Binational Study on Migration. This study, completed in 1997, served to reframe the issue of migration through a wider lens, one that encompassed both sides of the border instead of just one.

Mexican policymakers felt encouraged by the growing cooperation and interdependence that followed the adoption of NAFTA. They sought greater access to the U.S. for Mexican laborers through a new and more comprehensive bilateral migration agreement. They were so confident in securing such an agreement that Mexican Foreign Minister Jorge Castaneda declared Mexico would settle for no less than “the whole enchilada.”

The agreement was to include three elements:

1) Legalization for all undocumented Mexicans living in the U.S.,

2) a new legal channel of entry for Mexican laborers, and

3) protection of human rights for Mexican migrants.

For Mexico, such a deal would not only protect their nationals, but also reduce domestic unemployment and increase the inflow of remittances. In the first nine months of 2001, Mexican migrants in the U.S. sent home US$6.7 billion.

Newly elected President George W. Bush appeared receptive to discussing such an agreement. He afforded Mexican President Vicente Fox the honor of the first state visit of his administration on Sept. 5, 2001. Though expectations for an agreement were high on both sides, the events of Sept. 11 altered American security priorities and indefinitely tabled talks on a comprehensive migration accord.

Even so, U.S.-Mexico relations remained positive and cooperation continued. Mexico hoped that cooperation with the U.S. on border control might help rekindle discussions regarding an immigration accord. So, they created Plan Sur, a program directed at stemming the flow of Central Americans across Mexico’s southern border, many of whom were headed for the U.S. Through the program, 120,000 undocumented immigrants were deported from Mexico in 2002, and another 141,000 in 2003.

In addition, Mexico agreed to a Smart Borders plan with the United States in March 2002, which aimed to increase border security.

Although Mexican cooperation with the U.S. on security failed to rekindle negotiations for a migration accord, the culture of partnership that has existed since NAFTA prompted a few attempts at immigration reform in the U.S. For example, the Secure America and Orderly Immigration Act of 2005 included provisions for both legalization of undocumented workers and new visas for low-skilled workers. Mexico has remained hopeful that economic interdependence might eventually produce the agreement they have been seeking for so long.

When considered in historical context, Trump’s wall proposal isn’t an unprecedented departure in policy. During the 1990s the U.S. built walls to fortify the border along a number of key crossing points.

That said, President Trump’s sharp criticism of NAFTA signals a potential shift in how the United States views the relationship. He has yet to characterize Mexico as a partner, and as such, decades of close relations may be at risk.